Search code examples
javascripthighchartstooltiptreemap

Tooltip Options not working for Highcharts Treemap


I want to add some tooltip formatting to a Highcharts treemap. For example the valueSuffix or valueDecimals. I have no problems using those attributes with different chart types but somehow they don't work for treemaps.

Here is the example code and Fiddle where I tried to use them.

$('#container').highcharts({
        tooltip: {
            backgroundColor: '#00FF00',
            valueSuffix: 'E',
            valueDecimals: 2
        },
        series: [{
            type: "treemap",
            layoutAlgorithm: 'stripes',
            alternateStartingDirection: true,
            levels: [{
            }]
        }]
    });

as you can see, the background-color attribute works.

I know that I could use the formatter with a function, but I prefer using the properties provided by Highcharts.

According to the documentation, you can also use series.tooltip or plotOptions.treemap.tooltip properties for styling but they did not work either.


Solution

  • Thank you for the reporting. Looks like a bug, which I added to our tracker here: https://github.com/highcharts/highcharts/issues/5352