77 exports [ "VueFusionCharts" ] = factory ( require ( "fusioncharts" ) ) ;
88 else
99 root [ "VueFusionCharts" ] = factory ( root [ "FusionCharts" ] ) ;
10- } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_1__ ) {
10+ } ) ( window , function ( __WEBPACK_EXTERNAL_MODULE_fusioncharts__ ) {
1111return /******/ ( function ( modules ) { // webpackBootstrap
1212/******/ // The module cache
1313/******/ var installedModules = { } ;
@@ -43,9 +43,6 @@ return /******/ (function(modules) { // webpackBootstrap
4343/******/ // expose the module cache
4444/******/ __webpack_require__ . c = installedModules ;
4545/******/
46- /******/ // identity function for calling harmony imports with the correct context
47- /******/ __webpack_require__ . i = function ( value ) { return value ; } ;
48- /******/
4946/******/ // define getter function for harmony exports
5047/******/ __webpack_require__ . d = function ( exports , name , getter ) {
5148/******/ if ( ! __webpack_require__ . o ( exports , name ) ) {
@@ -57,6 +54,11 @@ return /******/ (function(modules) { // webpackBootstrap
5754/******/ }
5855/******/ } ;
5956/******/
57+ /******/ // define __esModule on exports
58+ /******/ __webpack_require__ . r = function ( exports ) {
59+ /******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
60+ /******/ } ;
61+ /******/
6062/******/ // getDefaultExport function for compatibility with non-harmony modules
6163/******/ __webpack_require__ . n = function ( module ) {
6264/******/ var getter = module && module . __esModule ?
@@ -72,12 +74,18 @@ return /******/ (function(modules) { // webpackBootstrap
7274/******/ // __webpack_public_path__
7375/******/ __webpack_require__ . p = "" ;
7476/******/
77+ /******/
7578/******/ // Load entry module and return exports
76- /******/ return __webpack_require__ ( __webpack_require__ . s = 2 ) ;
79+ /******/ return __webpack_require__ ( __webpack_require__ . s = "./src/index.js" ) ;
7780/******/ } )
7881/************************************************************************/
79- /******/ ( [
80- /* 0 */
82+ /******/ ( {
83+
84+ /***/ "./src/index.js" :
85+ /*!**********************!*\
86+ !*** ./src/index.js ***!
87+ \**********************/
88+ /*! no static exports found */
8189/***/ ( function ( module , exports , __webpack_require__ ) {
8290
8391"use strict" ;
@@ -86,15 +94,121 @@ return /******/ (function(modules) { // webpackBootstrap
8694Object . defineProperty ( exports , "__esModule" , {
8795 value : true
8896} ) ;
97+
98+ var _fusioncharts = __webpack_require__ ( /*! fusioncharts */ "fusioncharts" ) ;
99+
100+ var _fusioncharts2 = _interopRequireDefault ( _fusioncharts ) ;
101+
102+ var _vueFusioncharts = __webpack_require__ ( /*! ./vue-fusioncharts */ "./src/vue-fusioncharts.js" ) ;
103+
104+ var _vueFusioncharts2 = _interopRequireDefault ( _vueFusioncharts ) ;
105+
106+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
107+
108+ var addDep = function addDep ( FC , _FC , modules ) {
109+ if ( FC ) {
110+ if ( modules . getName || modules . name ) {
111+ FC . addDep ( modules ) ;
112+ } else {
113+ modules ( FC ) ;
114+ }
115+ } else {
116+ modules ( _FC ) ;
117+ }
118+ } ;
119+ var install = function install ( Vue , FC ) {
120+ for ( var _len = arguments . length , options = Array ( _len > 2 ? _len - 2 : 0 ) , _key = 2 ; _key < _len ; _key ++ ) {
121+ options [ _key - 2 ] = arguments [ _key ] ;
122+ }
123+
124+ options && options . forEach && options . forEach ( function ( modules ) {
125+ addDep ( FC , _fusioncharts2 . default , modules ) ;
126+ } ) ;
127+ var component = ( 0 , _vueFusioncharts2 . default ) ( FC ) ;
128+
129+ Vue . component ( component . name , component ) ;
130+ } ;
131+
132+ exports . default = install ;
133+ module . exports = exports [ 'default' ] ;
134+
135+ /***/ } ) ,
136+
137+ /***/ "./src/vue-fusioncharts.js" :
138+ /*!*********************************!*\
139+ !*** ./src/vue-fusioncharts.js ***!
140+ \*********************************/
141+ /*! no static exports found */
142+ /***/ ( function ( module , exports , __webpack_require__ ) {
143+
144+ "use strict" ;
145+
146+
147+ Object . defineProperty ( exports , "__esModule" , {
148+ value : true
149+ } ) ;
150+
151+ var _typeof = typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ? function ( obj ) { return typeof obj ; } : function ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ;
152+
89153var optionsMap = {
90154 type : 'type' ,
91155 id : 'id' ,
92156 width : 'width' ,
93157 height : 'height' ,
94- dataformat : 'dataFormat' ,
95- datasource : 'dataSource' ,
158+ dataFormat : 'dataFormat' ,
159+ dataSource : 'dataSource' ,
96160 events : 'events' ,
97161 link : 'link' ,
162+ showDataLoadingMessage : 'showDataLoadingMessage' ,
163+ showChartLoadingMessage : 'showChartLoadingMessage' ,
164+ baseChartMessageFont : 'baseChartMessageFont' ,
165+ baseChartMessageFontSize : 'baseChartMessageFontSize' ,
166+ baseChartMessageColor : 'baseChartMessageColor' ,
167+ dataLoadStartMessage : 'dataLoadStartMessage' ,
168+ dataLoadErrorMessage : 'dataLoadErrorMessage' ,
169+ dataInvalidMessage : 'dataInvalidMessage' ,
170+ dataEmptyMessage : 'dataEmptyMessage' ,
171+ typeNotSupportedMessage : 'typeNotSupportedMessage' ,
172+ loadMessage : 'loadMessage' ,
173+ renderErrorMessage : 'renderErrorMessage' ,
174+ containerBackgroundColor : 'containerBackgroundColor' ,
175+ containerBackgroundOpacity : 'containerBackgroundOpacity' ,
176+ containerClassName : 'containerClassName' ,
177+ baseChartMessageImageHAlign : 'baseChartMessageImageHAlign' ,
178+ baseChartMessageImageVAlign : 'baseChartMessageImageVAlign' ,
179+ baseChartMessageImageAlpha : 'baseChartMessageImageAlpha' ,
180+ baseChartMessageImageScale : 'baseChartMessageImageScale' ,
181+ typeNotSupportedMessageImageHAlign : 'typeNotSupportedMessageImageHAlign' ,
182+ typeNotSupportedMessageImageVAlign : 'typeNotSupportedMessageImageVAlign' ,
183+ typeNotSupportedMessageImageAlpha : 'typeNotSupportedMessageImageAlpha' ,
184+ typeNotSupportedMessageImageScale : 'typeNotSupportedMessageImageScale' ,
185+ dataLoadErrorMessageImageHAlign : 'dataLoadErrorMessageImageHAlign' ,
186+ dataLoadErrorMessageImageVAlign : 'dataLoadErrorMessageImageVAlign' ,
187+ dataLoadErrorMessageImageAlpha : 'dataLoadErrorMessageImageAlpha' ,
188+ dataLoadErrorMessageImageScale : 'dataLoadErrorMessageImageScale' ,
189+ dataLoadStartMessageImageHAlign : 'dataLoadStartMessageImageHAlign' ,
190+ dataLoadStartMessageImageVAlign : 'dataLoadStartMessageImageVAlign' ,
191+ dataLoadStartMessageImageAlpha : 'dataLoadStartMessageImageAlpha' ,
192+ dataLoadStartMessageImageScale : 'dataLoadStartMessageImageScale' ,
193+ dataInvalidMessageImageHAlign : 'dataInvalidMessageImageHAlign' ,
194+ dataInvalidMessageImageVAlign : 'dataInvalidMessageImageVAlign' ,
195+ dataInvalidMessageImageAlpha : 'dataInvalidMessageImageAlpha' ,
196+ dataInvalidMessageImageScale : 'dataInvalidMessageImageScale' ,
197+ dataEmptyMessageImageHAlign : 'dataEmptyMessageImageHAlign' ,
198+ dataEmptyMessageImageVAlign : 'dataEmptyMessageImageVAlign' ,
199+ dataEmptyMessageImageAlpha : 'dataEmptyMessageImageAlpha' ,
200+ dataEmptyMessageImageScale : 'dataEmptyMessageImageScale' ,
201+ renderErrorMessageImageHAlign : 'renderErrorMessageImageHAlign' ,
202+ renderErrorMessageImageVAlign : 'renderErrorMessageImageVAlign' ,
203+ renderErrorMessageImageAlpha : 'renderErrorMessageImageAlpha' ,
204+ renderErrorMessageImageScale : 'renderErrorMessageImageScale' ,
205+ loadMessageImageHAlign : 'loadMessageImageHAlign' ,
206+ loadMessageImageVAlign : 'loadMessageImageVAlign' ,
207+ loadMessageImageAlpha : 'loadMessageImageAlpha' ,
208+ loadMessageImageScale : 'loadMessageImageScale' ,
209+ ///////////////////////////////////////////////////////
210+ dataformat : 'dataFormat' ,
211+ datasource : 'dataSource' ,
98212 showdataloadingmessage : 'showDataLoadingMessage' ,
99213 showchartloadingmessage : 'showChartLoadingMessage' ,
100214 basechartmessagefont : 'baseChartMessageFont' ,
@@ -148,16 +262,69 @@ exports.default = function (FC) {
148262 return {
149263 name : 'fusioncharts' ,
150264 template : '<div></div>' ,
265+ render : function render ( h ) {
266+ return h ( 'div' ) ;
267+ } ,
151268 props : {
152269 options : Object ,
153270 type : String ,
154271 id : String ,
155272 width : '' ,
156273 height : '' ,
157- dataformat : String ,
158- datasource : '' ,
274+ dataFormat : String ,
275+ dataSource : '' ,
159276 events : Object ,
160277 link : Object ,
278+ showDataLoadingMessage : Boolean ,
279+ showChartLoadingMessage : Boolean ,
280+ baseChartMessageFont : String ,
281+ baseChartMessageFontSize : String ,
282+ baseChartMessageColor : String ,
283+ dataLoadStartMessage : String ,
284+ dataLoadErrorMessage : String ,
285+ dataInvalidMessage : String ,
286+ dataEmptyMessage : String ,
287+ typeNotSupportedMessage : String ,
288+ loadMessage : String ,
289+ renderErrorMessage : String ,
290+ containerBackgroundColor : String ,
291+ containerBackgroundOpacity : Number ,
292+ containerClassName : String ,
293+ baseChartMessageImageHAlign : String ,
294+ baseChartMessageImageVAlign : String ,
295+ baseChartMessageImageAlpha : Number ,
296+ baseChartMessageImageScale : Number ,
297+ typeNotSupportedMessageImageHAlign : String ,
298+ typeNotSupportedMessageImageVAlign : String ,
299+ typeNotSupportedMessageImageAlpha : Number ,
300+ typeNotSupportedMessageImageScale : Number ,
301+ dataLoadErrorMessageImageHAlign : String ,
302+ dataLoadErrorMessageImageVAlign : String ,
303+ dataLoadErrorMessageImageAlpha : Number ,
304+ dataLoadErrorMessageImageScale : Number ,
305+ dataLoadStartMessageImageHAlign : String ,
306+ dataLoadStartMessageImageVAlign : String ,
307+ dataLoadStartMessageImageAlpha : Number ,
308+ dataLoadStartMessageImageScale : Number ,
309+ dataInvalidMessageImageHAlign : String ,
310+ dataInvalidMessageImageVAlign : String ,
311+ dataInvalidMessageImageAlpha : Number ,
312+ dataInvalidMessageImageScale : Number ,
313+ dataEmptyMessageImageHAlign : String ,
314+ dataEmptyMessageImageVAlign : String ,
315+ dataEmptyMessageImageAlpha : Number ,
316+ dataEmptyMessageImageScale : Number ,
317+ renderErrorMessageImageHAlign : String ,
318+ renderErrorMessageImageVAlign : String ,
319+ renderErrorMessageImageAlpha : Number ,
320+ renderErrorMessageImageScale : Number ,
321+ loadMessageImageHAlign : String ,
322+ loadMessageImageVAlign : String ,
323+ loadMessageImageAlpha : Number ,
324+ loadMessageImageScale : Number ,
325+ ///////////////////////////////////////////////
326+ dataformat : String ,
327+ datasource : '' ,
161328 showdataloadingmessage : Boolean ,
162329 showchartloadingmessage : Boolean ,
163330 basechartmessagefont : String ,
@@ -205,8 +372,20 @@ exports.default = function (FC) {
205372 loadmessageimagevalign : String ,
206373 loadmessageimagealpha : Number ,
207374 loadmessageimagescale : Number
375+
208376 } ,
209377 methods : {
378+ attachListeners : function attachListeners ( ) {
379+ var _this = this ;
380+
381+ if ( this . $listeners && _typeof ( this . $listeners ) === 'object' ) {
382+ Object . keys ( this . $listeners ) . forEach ( function ( event ) {
383+ _this . chartObj . addEventListener ( event , function ( e ) {
384+ _this . $emit ( event , e ) ;
385+ } ) ;
386+ } ) ;
387+ }
388+ } ,
210389 setLastOptions : function setLastOptions ( config ) {
211390 this . _oldOptions = Object . assign ( { } , config ) ;
212391 } ,
@@ -239,6 +418,7 @@ exports.default = function (FC) {
239418 }
240419
241420 THIS . chartObj = chartObj = new FC ( config ) ;
421+ this . attachListeners ( ) ;
242422 chartObj . render ( ) ;
243423 } ,
244424 updateChart : function updateChart ( ) {
@@ -274,9 +454,15 @@ exports.default = function (FC) {
274454 } ,
275455 deep : true
276456 } ,
457+ dataSource : {
458+ handler : function handler ( ) {
459+ this . chartObj . setChartData ( this . dataSource , this . dataFormat ) ;
460+ } ,
461+ deep : true
462+ } ,
277463 datasource : {
278464 handler : function handler ( ) {
279- this . chartObj . setChartData ( this . datasource , this . dataformat ) ;
465+ this . chartObj . setChartData ( this . datasource || this . dataSource , this . dataFormat || this . dataformat ) ;
280466 } ,
281467 deep : true
282468 }
@@ -296,57 +482,17 @@ exports.default = function (FC) {
296482module . exports = exports [ 'default' ] ;
297483
298484/***/ } ) ,
299- /* 1 */
300- /***/ ( function ( module , exports ) {
301-
302- module . exports = __WEBPACK_EXTERNAL_MODULE_1__ ;
303-
304- /***/ } ) ,
305- /* 2 */
306- /***/ ( function ( module , exports , __webpack_require__ ) {
307-
308- "use strict" ;
309-
310-
311- Object . defineProperty ( exports , "__esModule" , {
312- value : true
313- } ) ;
314- exports . install = exports . FCComponent = undefined ;
315-
316- var _fusioncharts = __webpack_require__ ( 1 ) ;
317-
318- var _fusioncharts2 = _interopRequireDefault ( _fusioncharts ) ;
319-
320- var _vueFusioncharts = __webpack_require__ ( 0 ) ;
321-
322- var _vueFusioncharts2 = _interopRequireDefault ( _vueFusioncharts ) ;
323-
324- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
325-
326- var FCComponent = ( 0 , _vueFusioncharts2 . default ) ( _fusioncharts2 . default ) ;
327-
328- var install = function install ( Vue ) {
329- for ( var _len = arguments . length , options = Array ( _len > 2 ? _len - 2 : 0 ) , _key = 2 ; _key < _len ; _key ++ ) {
330- options [ _key - 2 ] = arguments [ _key ] ;
331- }
332-
333- var FC = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : _fusioncharts2 . default ;
334485
486+ /***/ "fusioncharts" :
487+ /*!******************************************************************************************************************!*\
488+ !*** external {"commonjs2":"fusioncharts","commonjs":"fusioncharts","amd":"fusioncharts","root":"FusionCharts"} ***!
489+ \******************************************************************************************************************/
490+ /*! no static exports found */
491+ /***/ ( function ( module , exports ) {
335492
336- options && options . forEach && options . forEach ( function ( modules ) {
337- modules ( FC ) ;
338- } ) ;
339-
340- var component = ( 0 , _vueFusioncharts2 . default ) ( FC ) ;
341-
342- Vue . component ( component . name , component ) ;
343- } ;
344-
345- exports . FCComponent = FCComponent ;
346- exports . install = install ;
347- exports . default = install ;
493+ module . exports = __WEBPACK_EXTERNAL_MODULE_fusioncharts__ ;
348494
349495/***/ } )
350- /******/ ] ) ;
351- } ) ;
352- //# sourceMappingURL=vue-fusioncharts.js.map
496+
497+ /******/ } ) ;
498+ } ) ;
0 commit comments