File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.Chart/Components/Chart Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import '../../js/chart.umd.js'
22import '../../js/chartjs-plugin-datalabels.js'
3+ import { deepMerge } from '../../../BootstrapBlazor/modules/utility.js'
34import Data from '../../../BootstrapBlazor/modules/data.js'
45import EventHandler from "../../../BootstrapBlazor/modules/event-handler.js"
56
67Chart . register ( ChartDataLabels ) ;
78
8- // WIP: wait net9 release
9- // later will move into bootstrapblazor for global init make sure window.BootstrapBlazor is defined
10- if ( window . BootstrapBlazor === void 0 ) {
11- window . BootstrapBlazor = { } ;
12- }
13-
149if ( window . BootstrapBlazor . Chart === void 0 ) {
1510 const elementMap = new Map ( ) ;
1611 window . BootstrapBlazor . Chart = new class {
@@ -99,20 +94,6 @@ const genericOptions = {
9994 radius : 0
10095}
10196
102- const deepMerge = ( obj1 , obj2 ) => {
103- for ( let key in obj2 ) {
104- if ( obj2 . hasOwnProperty ( key ) ) {
105- if ( obj2 [ key ] instanceof Object && obj1 [ key ] instanceof Object ) {
106- obj1 [ key ] = deepMerge ( obj1 [ key ] , obj2 [ key ] ) ;
107- }
108- else {
109- obj1 [ key ] = obj2 [ key ] ;
110- }
111- }
112- }
113- return obj1 ;
114- }
115-
11697const getChartOption = function ( option ) {
11798 const appendData = option . appendData ;
11899 delete option . appendData ;
You can’t perform that action at this time.
0 commit comments