Im using highcharts-angular library for rendering a sunburst chart. Im able to drill down and capture the event by using the click event. But im not able to capture the drill up event when i click on the back button. i tried using the drillup event, but that doesnt seem to work.
I have imported drilldown modules as well. Given below is my code.
TS:
import HC_sunburst from 'highcharts/modules/sunburst';
import Drilldown from 'highcharts/modules/drilldown';
HC_sunburst(Highcharts);
HC_stock(Highcharts);
Drilldown(Highcharts);
highcharts1: typeof Highcharts = Highcharts;
chartOptions1: Highcharts.Options;
this.chartOptions1 = {
chart: {
height: '100%'
},
title: {
text: ''
},
subtitle: {
text: ''
},
series: [{
type: 'sunburst',
data: sunburstSampleData,
allowDrillToNode: true,
cursor: 'pointer',
events: {
click: (e) => {
alert('drilldown');
},
drillup: (e) => {
alert('drillup');
}
},
dataLabels: {
format: '{point.name}',
filter: {
property: 'innerArcLength',
operator: '>',
value: 16
}
},
levels: [{
level: 1,
levelIsConstant: false,
dataLabels: {
filter: {
property: 'outerArcLength',
operator: '>',
value: 64
}
}
}, {
level: 2,
colorByPoint: true
},
{
level: 3,
colorVariation: {
key: 'brightness',
to: -0.5
}
}, {
level: 4,
colorVariation: {
key: 'brightness',
to: 0.5
}
}]
}]
};
HTML
<highcharts-chart *ngIf="chartOptions1"
[Highcharts]="highcharts1"
[options]="chartOptions1"
style="width: 100%; height: 500px; display: block;">
package.json
"highcharts": "^7.1.1",
"highcharts-angular": "^2.4.0",
Am i missing anything here? Please help me out.