angular-highcharts
angular-highcharts copied to clipboard
how can we fir controller method on highchart click event?
In the function containing your chart initialization, e.g. ngOnInit you can just set a variable to "this" and then reference it in the highcharts click event handler.
E.g.
ngOnInit() {
const comp = this;
this.chart = new Chart({
....
});
}
You can then use "comp" in the click event handler to reference the component.