简体   繁体   中英

Amcharts addInitHandler not working in Angular 2

I am trying to replicate the use case of putting an empty bar where there is no data in a column chart as here in Angular 2.

But it throws the following error -

在此处输入图片说明

How shall I make addInitHandler work in Angular 2?

I am not sure since I have not used Amcharts, but looking at the documents at their github page I think you might need to use addListener instead of addinithandler

this.AmCharts.addListener(this.chart, "init", (e) => {
  // Do stuff when the event happens
});

See enter link description here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM