jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

treemap datalabels at drilled down level

How can i make sure that all datalabels are displayed properly.. like in below example

https://jsfiddle.net/wjhpLzt9/2/

Apples -->Anne -->A1,A2,A3

at the root level i do want to display Apples-->Anne.. but level-2 label is hiding behind root level.. how can i make sure they dont overlap ?
i do want to display them on top and left if possible.
in above example if i un-comment the formatter function then it will show Anne but will hide default 'Apple' level..

is there a way to fix this ?
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: treemap datalabels at drilled down level

Hello jahnvi25,
Thanks for contacting us with your question!

It seems that there is a similar topic with a solution:
viewtopic.php?f=9&t=48565&p=176092&hilit=treemap

Here is the ticket with the feature request of parent dataLabels as a separate cell:
https://github.com/highcharts/highcharts/issues/17243

As a temporary workaround, I suggest you change the y-value of dataLabels on the first level, like in the demo below.

Demo: https://jsfiddle.net/BlackLabel/5vpoq8nw/
API Reference: https://api.highcharts.com/highcharts/s ... taLabels.y

Feel free to follow it, remember to leave a vote and if you have more questions feel free to ask.
Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”