Dunivivi
Posts: 14
Joined: Mon Mar 20, 2023 1:56 pm

Dynamic drilldown data

Hello everyone ! I have a drilldown with dynamic datas and my code looks like:
events: {
drilldown: async (e) => {
const chart = e.target;
console.warn(e.point);
if (e.point !== null) {

const eventId = e.seriesOptions?.id;
if (eventId) {
const point = e.point;
chart.showLoading('Loading...');

const series = await this.getDrilldown(eventId);
console.warn(point);

chart.hideLoading();
chart.addSeriesAsDrilldown(e.point, series[0]);
}
}
}
}

Before i check e.point !== null, it has all the valuesm but when i do chart.addSeriesAsDrilldown(e.point, series[0]); all the fields from e.point are null. What should i do ?
Dunivivi
Posts: 14
Joined: Mon Mar 20, 2023 1:56 pm

Re: Dynamic drilldown data

Also, in console we can see error about xAxis, because of null e.point
User avatar
dawid.d
Posts: 837
Joined: Thu Oct 06, 2022 11:31 am

Re: Dynamic drilldown data

Hi,

Thanks for contacting us with your question!

See the demo below, is this what you were looking for?
Demo: https://stackblitz.com/edit/highcharts- ... mponent.ts

Best regards!
Dawid Draguła
Highcharts Developer
Dunivivi
Posts: 14
Joined: Mon Mar 20, 2023 1:56 pm

Re: Dynamic drilldown data

Thanks, @dawid.d
User avatar
dawid.d
Posts: 837
Joined: Thu Oct 06, 2022 11:31 am

Re: Dynamic drilldown data

You're welcome!
In case of any further questions, feel free to contact us again.

Regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Usage”