12
12
exports [ "VueChartJs" ] = factory ( require ( "chart.js" ) ) ;
13
13
else
14
14
root [ "VueChartJs" ] = factory ( root [ "Chart" ] ) ;
15
- } ) ( typeof self !== 'undefined' ? self : this , function ( __WEBPACK_EXTERNAL_MODULE_4__ ) {
15
+ } ) ( typeof self !== 'undefined' ? self : this , function ( __WEBPACK_EXTERNAL_MODULE_1__ ) {
16
16
return /******/ ( function ( modules ) { // webpackBootstrap
17
17
/******/ // The module cache
18
18
/******/ var installedModules = { } ;
@@ -85,27 +85,89 @@ return /******/ (function(modules) { // webpackBootstrap
85
85
"use strict" ;
86
86
Object . defineProperty ( __webpack_exports__ , "__esModule" , { value : true } ) ;
87
87
88
- // EXTERNAL MODULE: ./src/mixins/reactiveData.js
89
- var reactiveData = __webpack_require__ ( 1 ) ;
90
- var reactiveData_default = /*#__PURE__*/ __webpack_require__ . n ( reactiveData ) ;
88
+ // CONCATENATED MODULE: ./src/mixins/index.js
89
+ function dataHandler ( newData , oldData ) {
90
+ if ( oldData ) {
91
+ var chart = this . $data . _chart ;
92
+ var newDatasetLabels = newData . datasets . map ( function ( dataset ) {
93
+ return dataset . label ;
94
+ } ) ;
95
+ var oldDatasetLabels = oldData . datasets . map ( function ( dataset ) {
96
+ return dataset . label ;
97
+ } ) ;
98
+ var oldLabels = JSON . stringify ( oldDatasetLabels ) ;
99
+ var newLabels = JSON . stringify ( newDatasetLabels ) ;
100
+
101
+ if ( newLabels === oldLabels && oldData . datasets . length === newData . datasets . length ) {
102
+ newData . datasets . forEach ( function ( dataset , i ) {
103
+ var oldDatasetKeys = Object . keys ( oldData . datasets [ i ] ) ;
104
+ var newDatasetKeys = Object . keys ( dataset ) ;
105
+ var deletionKeys = oldDatasetKeys . filter ( function ( key ) {
106
+ return key !== '_meta' && newDatasetKeys . indexOf ( key ) === - 1 ;
107
+ } ) ;
108
+ deletionKeys . forEach ( function ( deletionKey ) {
109
+ delete chart . data . datasets [ i ] [ deletionKey ] ;
110
+ } ) ;
91
111
92
- // EXTERNAL MODULE: ./src/mixins/reactiveProp.js
93
- var reactiveProp = __webpack_require__ ( 2 ) ;
94
- var reactiveProp_default = /*#__PURE__*/ __webpack_require__ . n ( reactiveProp ) ;
112
+ for ( var attribute in dataset ) {
113
+ if ( dataset . hasOwnProperty ( attribute ) ) {
114
+ chart . data . datasets [ i ] [ attribute ] = dataset [ attribute ] ;
115
+ }
116
+ }
117
+ } ) ;
95
118
96
- // CONCATENATED MODULE: ./src/mixins/index.js
119
+ if ( newData . hasOwnProperty ( 'labels' ) ) {
120
+ chart . data . labels = newData . labels ;
121
+ }
122
+
123
+ if ( newData . hasOwnProperty ( 'xLabels' ) ) {
124
+ chart . data . xLabels = newData . xLabels ;
125
+ }
126
+
127
+ if ( newData . hasOwnProperty ( 'yLabels' ) ) {
128
+ chart . data . yLabels = newData . yLabels ;
129
+ }
97
130
131
+ chart . update ( ) ;
132
+ } else {
133
+ chart . destroy ( ) ;
134
+ this . renderChart ( this . chartData , this . options ) ;
135
+ }
136
+ } else {
137
+ if ( this . $data . _chart ) {
138
+ this . $data . _chart . destroy ( ) ;
139
+ }
140
+
141
+ this . renderChart ( this . chartData , this . options ) ;
142
+ }
143
+ }
98
144
145
+ var reactiveData = {
146
+ data : function data ( ) {
147
+ return {
148
+ chartData : null
149
+ } ;
150
+ } ,
151
+ watch : {
152
+ 'chartData' : dataHandler
153
+ }
154
+ } ;
155
+ var reactiveProp = {
156
+ props : {
157
+ chartData : {
158
+ required : true
159
+ }
160
+ } ,
161
+ watch : {
162
+ 'chartData' : dataHandler
163
+ }
164
+ } ;
99
165
/* harmony default export */ var mixins = ( {
100
- reactiveData : reactiveData_default . a ,
101
- reactiveProp : reactiveProp_default . a
166
+ reactiveData : reactiveData ,
167
+ reactiveProp : reactiveProp
102
168
} ) ;
103
- // EXTERNAL MODULE: ./package.json
104
- var package_0 = __webpack_require__ ( 3 ) ;
105
- var package_default = /*#__PURE__*/ __webpack_require__ . n ( package_0 ) ;
106
-
107
169
// EXTERNAL MODULE: external {"root":"Chart","commonjs":"chart.js","commonjs2":"chart.js","amd":"chart.js"}
108
- var external___root___Chart___commonjs___chart_js___commonjs2___chart_js___amd___chart_js__ = __webpack_require__ ( 4 ) ;
170
+ var external___root___Chart___commonjs___chart_js___commonjs2___chart_js___amd___chart_js__ = __webpack_require__ ( 1 ) ;
109
171
var external___root___Chart___commonjs___chart_js___commonjs2___chart_js___amd___chart_js___default = /*#__PURE__*/ __webpack_require__ . n ( external___root___Chart___commonjs___chart_js___commonjs2___chart_js___amd___chart_js__ ) ;
110
172
111
173
// CONCATENATED MODULE: ./src/BaseCharts.js
@@ -214,9 +276,8 @@ var Scatter = generateChart('scatter-chart', 'scatter');
214
276
/* concated harmony reexport */ __webpack_require__ . d ( __webpack_exports__ , "mixins" , function ( ) { return mixins ; } ) ;
215
277
216
278
217
-
218
279
var VueCharts = {
219
- version : package_default . a . version ,
280
+ version : LIB_VERSION ,
220
281
Bar : Bar ,
221
282
HorizontalBar : HorizontalBar ,
222
283
Doughnut : Doughnut ,
@@ -235,155 +296,7 @@ var VueCharts = {
235
296
/* 1 */
236
297
/***/ ( function ( module , exports ) {
237
298
238
- module . exports = {
239
- data : function data ( ) {
240
- return {
241
- chartData : null
242
- } ;
243
- } ,
244
- watch : {
245
- 'chartData' : {
246
- handler : function handler ( newData , oldData ) {
247
- if ( oldData ) {
248
- var chart = this . $data . _chart ;
249
- var newDatasetLabels = newData . datasets . map ( function ( dataset ) {
250
- return dataset . label ;
251
- } ) ;
252
- var oldDatasetLabels = oldData . datasets . map ( function ( dataset ) {
253
- return dataset . label ;
254
- } ) ;
255
- var oldLabels = JSON . stringify ( oldDatasetLabels ) ;
256
- var newLabels = JSON . stringify ( newDatasetLabels ) ;
257
-
258
- if ( newLabels === oldLabels && oldData . datasets . length === newData . datasets . length ) {
259
- newData . datasets . forEach ( function ( dataset , i ) {
260
- var oldDatasetKeys = Object . keys ( oldData . datasets [ i ] ) ;
261
- var newDatasetKeys = Object . keys ( dataset ) ;
262
- var deletionKeys = oldDatasetKeys . filter ( function ( key ) {
263
- return key !== '_meta' && newDatasetKeys . indexOf ( key ) === - 1 ;
264
- } ) ;
265
- deletionKeys . forEach ( function ( deletionKey ) {
266
- delete chart . data . datasets [ i ] [ deletionKey ] ;
267
- } ) ;
268
-
269
- for ( var attribute in dataset ) {
270
- if ( dataset . hasOwnProperty ( attribute ) ) {
271
- chart . data . datasets [ i ] [ attribute ] = dataset [ attribute ] ;
272
- }
273
- }
274
- } ) ;
275
-
276
- if ( newData . hasOwnProperty ( 'labels' ) ) {
277
- chart . data . labels = newData . labels ;
278
- }
279
-
280
- if ( newData . hasOwnProperty ( 'xLabels' ) ) {
281
- chart . data . xLabels = newData . xLabels ;
282
- }
283
-
284
- if ( newData . hasOwnProperty ( 'yLabels' ) ) {
285
- chart . data . yLabels = newData . yLabels ;
286
- }
287
-
288
- chart . update ( ) ;
289
- } else {
290
- chart . destroy ( ) ;
291
- this . renderChart ( this . chartData , this . options ) ;
292
- }
293
- } else {
294
- if ( this . $data . _chart ) {
295
- this . $data . _chart . destroy ( ) ;
296
- }
297
-
298
- this . renderChart ( this . chartData , this . options ) ;
299
- }
300
- }
301
- }
302
- }
303
- } ;
304
-
305
- /***/ } ) ,
306
- /* 2 */
307
- /***/ ( function ( module , exports ) {
308
-
309
- module . exports = {
310
- props : {
311
- chartData : {
312
- required : true
313
- }
314
- } ,
315
- watch : {
316
- 'chartData' : {
317
- handler : function handler ( newData , oldData ) {
318
- if ( oldData ) {
319
- var chart = this . $data . _chart ;
320
- var newDatasetLabels = newData . datasets . map ( function ( dataset ) {
321
- return dataset . label ;
322
- } ) ;
323
- var oldDatasetLabels = oldData . datasets . map ( function ( dataset ) {
324
- return dataset . label ;
325
- } ) ;
326
- var oldLabels = JSON . stringify ( oldDatasetLabels ) ;
327
- var newLabels = JSON . stringify ( newDatasetLabels ) ;
328
-
329
- if ( newLabels === oldLabels && oldData . datasets . length === newData . datasets . length ) {
330
- newData . datasets . forEach ( function ( dataset , i ) {
331
- var oldDatasetKeys = Object . keys ( oldData . datasets [ i ] ) ;
332
- var newDatasetKeys = Object . keys ( dataset ) ;
333
- var deletionKeys = oldDatasetKeys . filter ( function ( key ) {
334
- return key !== '_meta' && newDatasetKeys . indexOf ( key ) === - 1 ;
335
- } ) ;
336
- deletionKeys . forEach ( function ( deletionKey ) {
337
- delete chart . data . datasets [ i ] [ deletionKey ] ;
338
- } ) ;
339
-
340
- for ( var attribute in dataset ) {
341
- if ( dataset . hasOwnProperty ( attribute ) ) {
342
- chart . data . datasets [ i ] [ attribute ] = dataset [ attribute ] ;
343
- }
344
- }
345
- } ) ;
346
-
347
- if ( newData . hasOwnProperty ( 'labels' ) ) {
348
- chart . data . labels = newData . labels ;
349
- }
350
-
351
- if ( newData . hasOwnProperty ( 'xLabels' ) ) {
352
- chart . data . xLabels = newData . xLabels ;
353
- }
354
-
355
- if ( newData . hasOwnProperty ( 'yLabels' ) ) {
356
- chart . data . yLabels = newData . yLabels ;
357
- }
358
-
359
- chart . update ( ) ;
360
- } else {
361
- chart . destroy ( ) ;
362
- this . renderChart ( this . chartData , this . options ) ;
363
- }
364
- } else {
365
- if ( this . $data . _chart ) {
366
- this . $data . _chart . destroy ( ) ;
367
- }
368
-
369
- this . renderChart ( this . chartData , this . options ) ;
370
- }
371
- }
372
- }
373
- }
374
- } ;
375
-
376
- /***/ } ) ,
377
- /* 3 */
378
- /***/ ( function ( module , exports ) {
379
-
380
- module . exports = { "name" :
"vue-chartjs" , "version" :
"3.1.1" , "description" :
"Vue.js wrapper for chart.js for creating beautiful charts." , "author" :
"Jakub Juszczak <[email protected] >" , "homepage" :
"http://vue-chartjs.org" , "license" :
"MIT" , "contributors" :
[ { "name" :
"Thorsten Lünborg" , "web" :
"https://github.com/LinusBorg" } , { "name" :
"Juan Carlos Alonso" , "web" :
"https://github.com/jcalonso" } ] , "maintainers" :
[ { "name" :
"Jakub Juszczak" , "email" :
"[email protected] " , "web" :
"http://www.jakubjuszczak.de" } ] , "repository" :
{ "type" :
"git" , "url" :
"git+ssh://[email protected] :apertureless/vue-chartjs.git" } , "bugs" :
{ "url" :
"https://github.com/apertureless/vue-chartjs/issues" } , "keywords" :
[ "ChartJs" , "Vue" , "Visualisation" , "Wrapper" , "Charts" ] , "main" :
"dist/vue-chartjs.js" , "unpkg" :
"dist/vue-chartjs.min.js" , "module" :
"es/index.js" , "jsnext:main" :
"es/index.js" , "files" :
[ "src" , "dist" , "es" ] , "scripts" :
{ "dev" :
"node build/dev-server.js" , "build" :
"yarn run release && yarn run build:es" , "build:es" :
"cross-env BABEL_ENV=es babel src --out-dir es" , "unit" :
"karma start test/unit/karma.conf.js --single-run" , "e2e" :
"node test/e2e/runner.js" , "test" :
"npm run unit" , "lint" :
"eslint --ext .js,.vue src test/unit/specs test/e2e/specs" , "release" :
"webpack --progress --hide-modules --config ./build/webpack.release.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.min.js" , "prepublishOnly" :
"yarn run lint && yarn run test && yarn run build" } , "dependencies" :
{ } , "peerDependencies" :
{ "chart.js" :
"2.7.x" } , "devDependencies" :
{ "@babel/cli" :
"^7.0.0-beta.31" , "@babel/core" :
"^7.0.0-beta.31" , "@babel/preset-env" :
"^7.0.0-beta.31" , "@babel/preset-stage-2" :
"^7.0.0-beta.31" , "babel-loader" :
"8.0.0-beta.0" , "chai" :
"^3.5.0" , "chart.js" :
"2.7.0" , "chromedriver" :
"^2.28.0" , "connect-history-api-fallback" :
"^1.1.0" , "cross-env" :
"^5.1.1" , "cross-spawn" :
"^5.1.0" , "css-loader" :
"^0.28.0" , "eslint" :
"^3.19.0" , "eslint-config-standard" :
"^10.2.1" , "eslint-friendly-formatter" :
"^2.0.7" , "eslint-loader" :
"^1.7.1" , "eslint-plugin-html" :
"^2.0.1" , "eslint-plugin-import" :
"^2.2.0" , "eslint-plugin-node" :
"^4.2.2" , "eslint-plugin-promise" :
"^3.5.0" , "eslint-plugin-standard" :
"^3.0.1" , "eventsource-polyfill" :
"^0.9.6" , "express" :
"^4.15.2" , "extract-text-webpack-plugin" :
"^3.0.1" , "file-loader" :
"^0.10.1" , "friendly-errors-webpack-plugin" :
"^1.6.1" , "function-bind" :
"^1.0.2" , "html-webpack-plugin" :
"^2.28.0" , "http-proxy-middleware" :
"^0.17.4" , "inject-loader" :
"^3.0.0" , "isparta" :
"^4.0.0" , "jasmine-core" :
"^2.5.2" , "json-loader" :
"^0.5.4" , "karma" :
"^1.5.0" , "karma-coverage" :
"^1.1.1" , "karma-jasmine" :
"^1.0.2" , "karma-mocha" :
"^1.2.0" , "karma-phantomjs-launcher" :
"^1.0.4" , "karma-phantomjs-shim" :
"^1.4.0" , "karma-sinon-chai" :
"^1.2.0" , "karma-sourcemap-loader" :
"^0.3.7" , "karma-spec-reporter" :
"0.0.30" , "karma-webpack" :
"2" , "lolex" :
"^1.6.0" , "mocha" :
"^3.1.0" , "opn" :
"^5.1.0" , "ora" :
"^1.2.0" , "phantomjs-prebuilt" :
"^2.1.13" , "portfinder" :
"^1.0.13" , "selenium-server" :
"^3.3.1" , "shelljs" :
"^0.7.7" , "sinon" :
"^2.1.0" , "sinon-chai" :
"^2.9.0" , "url-loader" :
"^0.5.8" , "vue" :
"2.5.2" , "vue-hot-reload-api" :
"2.1.0" , "vue-html-loader" :
"^1.2.4" , "vue-loader" :
"^13.3.0" , "vue-style-loader" :
"3.0.1" , "vue-template-compiler" :
"2.5.2" , "webpack" :
"^3.7.1" , "webpack-dev-middleware" :
"^1.10.1" , "webpack-hot-middleware" :
"^2.17.1" , "webpack-merge" :
"^4.1.0" } , "engines" :
{ "node" :
">=6.9.0" , "npm" :
">= 3.0.0" } , "browserify" :
{ "transform" :
[ "babelify" ] } , "greenkeeper" :
{ "ignore" :
[ "extract-text-webpack-plugin" , "karma-webpack" , "webpack" , "webpack-merge" ] } }
381
-
382
- /***/ } ) ,
383
- /* 4 */
384
- /***/ ( function ( module , exports ) {
385
-
386
- module . exports = __WEBPACK_EXTERNAL_MODULE_4__ ;
299
+ module . exports = __WEBPACK_EXTERNAL_MODULE_1__ ;
387
300
388
301
/***/ } )
389
302
/******/ ] ) ;
0 commit comments