Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Using setData doesn't recalculate the text color correct on a Heatmap #6171
Hello everyone, I have a very complex Heatmap graph and I've found what I think is a bug on how Highcharts choose the text color to use. My heatmap uses a colorAxis with dataclasses, falt colors based on value. The data can change programatically.
Based on the colors of the cell, Highcharts choose if the text color will be white or black. But, that only happens on creating the chart, if you update it, it doesn't recalculate the color. And that, in my case, makes some font transparent (I'm removing the textOutline, if you keep it, you will see that the fill is still unchanged)
When you uset series.setData to change the values, it should re-choose the text-color.
The text-color of a cell is always the one decided on the first load.
Besides fixing for the actual behaviour, ideally we should be able to pass the value of the text color we want to use
Live demo with steps to reproduce
Tested on Chromium and Firefox