Reputation: 3253
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.
Upvotes: 1
Views: 720
Reputation: 20536
A workaround is to push what appears to be a missing value in pointArrayMap
manually.
For example (JSFiddle):
Highcharts.seriesTypes.treemap.prototype.pointArrayMap.push('node.val');
Upvotes: 1
Reputation: 37588
Thank you for the reporting. Looks like a bug, which I added to our tracker here: https://github.com/highcharts/highcharts/issues/5352
Upvotes: 2