Manali1996
Posts: 3
Joined: Thu Feb 11, 2021 5:00 am

Convert Coloraxis in treemap as legends

How to convert coloraxis in treemap to legends of type point in treemap.
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Convert Coloraxis in treemap as legends

Hi,

Thanks for contacting us with your question!

If you want to enable point legend on treemap, you need to add the following code at series:

Code: Select all

showInLegend: true,
legendType: 'point'

Demo:
https://jsfiddle.net/BlackLabel/xrm76hub/

You can also customize your legend using Extending Higcharts:

Docs about Extending Highcharts:
https://www.highcharts.com/docs/extendi ... highcharts

Demo:
https://jsfiddle.net/BlackLabel/207mftds/

Let me know if you have any further questions!
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
Manali1996
Posts: 3
Joined: Thu Feb 11, 2021 5:00 am

Re: Convert Coloraxis in treemap as legends

Hi , thanks for your reply but my problem statement is different
I have data in the format : {
id:1,name:'1f1',value:1,colorValue:1}
So basically i have 3 colorValues ={1,2,3} on the basis of which i have backgroundcolor for labelbox for each data as green, red,yellow as seen in the attachment.
I want to have legends according to that colorValue like bullet color green for 1, bullet color red for 2, bullet color yellow for 3
Attachments
Capture.PNG
Capture.PNG (8.46 KiB) Viewed 777 times
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Convert Coloraxis in treemap as legends

Hello,

How do you create your labels? Could you please reproduce the issue in an online editor that I could work on? It will be much easier to understand your problem.
You can start here: https://jsfiddle.net/BlackLabel/udj4ystx/

Regards!
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Maps”