sachinagarwal010

How to select last Level in Tree map HIghCharts

I am using the attached example https://codesandbox.io/s/react-highchar ... from-embed and wanted to select the last level while expanding each level , but I can see on last Level we are not able to click, Do we have any way to do it , on each level click we do API call.
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: How to select last Level in Tree map HIghCharts

Hello sachinagarwal010!
Welcome to our forum and thanks for contacting us with your question!

I am not quite sure, what do mean by selecting the last level while expanding each level, because after clicking on your demo you are doing drill down to the child and changing the look of the chart. If you want to fire some custom code while clicking on the point you can use series.points.events.click callback function. Here is a little example added to your demo: https://codesandbox.io/s/react-highchar ... ked-ul3hed In that function, you can add some if statement and check if that's for example the last point (last child) and make some operation.

API Reference: https://api.highcharts.com/highcharts/p ... int.events

Let me know if that was what you were looking for.
Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”