Skip to content

Commit b7ee57e

Browse files
committed
build files
1 parent 60d03c6 commit b7ee57e

File tree

6 files changed

+72
-31
lines changed

6 files changed

+72
-31
lines changed

dist/dist/index.js

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -471,22 +471,37 @@ var FusionChartsComponent = /** @class */ (function () {
471471
this.chartObj.chartType(this.type);
472472
}
473473
};
474-
FusionChartsComponent.prototype.attachChartEventListener = function (chartObj, eventName) {
475-
var _this_1 = this;
476-
chartObj.addEventListener(eventName, function (eventObj, dataObj) {
477-
var fEventObj = { eventObj: {}, dataObj: {} };
478-
if (eventObj)
479-
fEventObj.eventObj = eventObj;
480-
if (dataObj)
481-
fEventObj.dataObj = dataObj;
482-
_this_1[eventName].emit(fEventObj);
474+
/*
475+
// Removed as some events will be fired
476+
attachChartEventListener(chartObj: any, eventName: string){
477+
chartObj.addEventListener(eventName, (eventObj:any, dataObj:any) => {
478+
let fEventObj:FusionChartsEvent = { eventObj:{}, dataObj:{} };
479+
if(eventObj) fEventObj.eventObj = eventObj;
480+
if(dataObj) fEventObj.dataObj = dataObj;
481+
this[eventName].emit(fEventObj);
483482
});
484-
};
485-
FusionChartsComponent.prototype.attachAllChartEvents = function (chartObj, eventList$$1) {
483+
}
484+
485+
attachAllChartEvents(chartObj:any, eventList:Array<string>){
486+
eventList.forEach(eventName => {
487+
this.attachChartEventListener(chartObj, eventName);
488+
});
489+
}
490+
*/
491+
FusionChartsComponent.prototype.generateEventsCallback = function (eventList$$1) {
486492
var _this_1 = this;
493+
var events = {};
487494
eventList$$1.forEach(function (eventName) {
488-
_this_1.attachChartEventListener(chartObj, eventName);
495+
events[eventName] = function (eventObj, dataObj) {
496+
var fEventObj = { eventObj: {}, dataObj: {} };
497+
if (eventObj)
498+
fEventObj.eventObj = eventObj;
499+
if (dataObj)
500+
fEventObj.dataObj = dataObj;
501+
_this_1[eventName].emit(fEventObj);
502+
};
489503
});
504+
return events;
490505
};
491506
FusionChartsComponent.prototype.ngAfterViewInit = function () {
492507
var _this = this, params = _this.constructerParams, configObj = _this.configObj || (_this.configObj = {});
@@ -502,13 +517,19 @@ var FusionChartsComponent = /** @class */ (function () {
502517
}
503518
}
504519
if (configObj['type']) {
520+
var events = _this.generateEventsCallback(_this.eventList);
521+
if (!configObj['events']) {
522+
configObj['events'] = events;
523+
}
524+
else {
525+
configObj['events'] = Object.assign(events, configObj['events']);
526+
}
505527
_this.chartObj = FusionChartsConstructor(_this.fusionchartsService, configObj);
506528
this.initialized.emit({ chart: _this.chartObj });
507529
// configObj['renderAt'] = 'container-' + _this.chartObj.id;
508530
// _this.containerId = _this.chartObj.id;
509531
this.zone.runOutsideAngular(function () {
510532
setTimeout(function () {
511-
_this.attachAllChartEvents(_this.chartObj, _this.eventList);
512533
_this.chartObj.render(_this.element.nativeElement.querySelector('div'));
513534
}, 1);
514535
});

dist/dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/fusioncharts.component.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ declare class FusionChartsComponent implements OnInit, OnChanges, DoCheck, After
218218
updateWidth(): void;
219219
updateHeight(): void;
220220
updateType(): void;
221-
attachChartEventListener(chartObj: any, eventName: string): void;
222-
attachAllChartEvents(chartObj: any, eventList: Array<string>): void;
221+
generateEventsCallback(eventList: Array<string>): {};
223222
ngAfterViewInit(): void;
224223
ngOnDestroy(): void;
225224
}

dist/src/fusioncharts.component.js

Lines changed: 34 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/fusioncharts.component.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/fusioncharts.component.metadata.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)