Open shreyanshd opened 7 years ago
I noticed this as well, it looks like there is a bug in the deepAssign
logic where the base object they merge with the user provided chart options overrides the event handlers you pass in.
same issue here with 0.5.5, Could you make it work? I've already import the drilldown module
export function highchartsFactory() { let highcharts = require('highcharts'); let highchartsMore = require('highcharts/highcharts-more'); let gauge = require('highcharts/modules/solid-gauge'); let map = require('highcharts/modules/map'); let drilldown = require('highcharts/modules/drilldown');
highchartsMore(highcharts);
gauge(highcharts);
map(highcharts);
drilldown(highcharts);
return highcharts;
}
@joel00 I was not able to get it to work in options.chart.events
.
However, in order to handle drilldown
and drillup
events, I did this in my template :
<chart [options]="options" (drilldown)="onDrilldown()" (drillup)="onDrillup()"> </chart>
and defined the onDrilldown()
and onDrillup()
methods in my component.
Both events are firing correctly.
@shreyanshd thanks I can trigger the drilldown and drillup events...... but cannot figure it out how to assign the new map/data as the example in: http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/maps/demo/map-drilldown/
I'm trying:
drilldown(event: any) { const point = event.originalEvent.point; console.log(point.id);
this.chart.showLoading('Loading'); <=== works this.chart.addSeriesAsDrilldown(point.id, { data: this.data, mapData: newMap, <===== getting compiling error name: point.id, dataLabels: { <= getting compiling error enabled: true, format: '{point.name}' } }); }
Could you put me in the right path?
This code is a part of my
chart options
. Why are thedrilldown
anddrillup
events not firing, whereas theclick
event fires correctly whenever i click on the canvas?