Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using setData doesn't recalculate the text color correct on a Heatmap #6171

yohanleafheart opened this issue Dec 22, 2016 · 2 comments


Copy link

@yohanleafheart yohanleafheart commented Dec 22, 2016

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)

Expected behaviour

When you uset series.setData to change the values, it should re-choose the text-color.

Actual behaviour

The text-color of a cell is always the one decided on the first load.

Best behaviour

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

Affected browser(s)

Tested on Chromium and Firefox
Using Highcharts 4.2.6

Copy link

@jon-a-nygaard jon-a-nygaard commented Dec 23, 2016

Thanks for reporting!

Internal Note: Simplified demo. Seems like perhaps the Point.update is not updating data label color.

Copy link

@yohanleafheart yohanleafheart commented Dec 23, 2016

You're welcome, and thanks for the simplified demo. I tried to keep it as close as to my environment thinking that it might be something related to a dojo integration, but looks like it is not. Thanks again.

@jon-a-nygaard jon-a-nygaard self-assigned this Dec 29, 2016
jon-a-nygaard added a commit that referenced this issue Jan 2, 2017
@jon-a-nygaard jon-a-nygaard added this to the 5.0.7 milestone Jan 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants