@@ -13,8 +13,9 @@ var core_1 = require("@angular/core");
1313var fusioncharts_service_1 = require ( "./fusioncharts.service" ) ;
1414var fusioncharts_constructor_1 = require ( "./fusioncharts.constructor" ) ;
1515var FusionChartsComponent = ( function ( ) {
16- function FusionChartsComponent ( element , fusionchartsService , differs ) {
16+ function FusionChartsComponent ( element , fusionchartsService , differs , zone ) {
1717 this . differs = differs ;
18+ this . zone = zone ;
1819 this . oldDataSource = this . dataSource ;
1920 this . constructerParams = {
2021 type : true ,
@@ -127,9 +128,8 @@ var FusionChartsComponent = (function () {
127128 }
128129 } ;
129130 FusionChartsComponent . prototype . ngAfterViewInit = function ( ) {
130- var _this = this ,
131- // element = _this.element.nativeElement,
132- _chartConfig = _this . chartConfig || { } , params = _this . constructerParams , configObj = _this . configObj || ( _this . configObj = { } ) ;
131+ var _this = this , params = _this . constructerParams , configObj = _this . configObj || ( _this . configObj = { } ) ;
132+ var _chartConfig = _this . chartConfig || { } ;
133133 if ( typeof _chartConfig === 'string' ) {
134134 _chartConfig = JSON . parse ( _chartConfig ) ;
135135 }
@@ -142,11 +142,11 @@ var FusionChartsComponent = (function () {
142142 }
143143 if ( configObj [ 'type' ] ) {
144144 _this . chartObj = fusioncharts_constructor_1 . FusionChartsConstructor ( _this . fusionchartsService , configObj ) ;
145- configObj [ 'renderAt' ] = 'container-' + _this . chartObj . id ;
146- _this . containerId = _this . chartObj . id ;
145+ // configObj['renderAt'] = 'container-' + _this.chartObj.id;
146+ // _this.containerId = _this.chartObj.id;
147147 this . zone . runOutsideAngular ( function ( ) {
148148 setTimeout ( function ( ) {
149- _this . chartObj . render ( _this . configObj [ 'renderAt' ] ) ;
149+ _this . chartObj . render ( _this . element . nativeElement . querySelector ( 'div' ) ) ;
150150 } , 1 ) ;
151151 } ) ;
152152 }
@@ -394,7 +394,6 @@ FusionChartsComponent = __decorate([
394394 template : "<div attr.id=\"container-{{containerId}}\" >{{placeholder}}</div>\n " ,
395395 providers : [ fusioncharts_service_1 . FusionChartsService ] ,
396396 } ) ,
397- __metadata ( "design:paramtypes" , [ typeof ( _a = typeof core_1 . ElementRef !== "undefined" && core_1 . ElementRef ) === "function" && _a || Object , fusioncharts_service_1 . FusionChartsService , typeof ( _b = typeof core_1 . KeyValueDiffers !== "undefined" && core_1 . KeyValueDiffers ) === "function" && _b || Object ] )
397+ __metadata ( "design:paramtypes" , [ core_1 . ElementRef , fusioncharts_service_1 . FusionChartsService , core_1 . KeyValueDiffers , core_1 . NgZone ] )
398398] , FusionChartsComponent ) ;
399399exports . FusionChartsComponent = FusionChartsComponent ;
400- var _a , _b ;
0 commit comments