-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
dataLabel color should be able to apply contrast color when it's in the bar chart #17413
Comments
Hello @tkforce, thanks for creating this issue. (As well as on react example https://codesandbox.io/s/dark-paper-bioxzi) The first color of the Highcharts color palette (bluish) is best contrasted by black. We recently improved our algorithm for calculating the best contrast color here: #17273 This algorithm hasn't been released yet, so in the next release, it will be available. |
Hi @pawellysy |
Works fine with |
Hi again! Currently, the dataLabel's contrast color only takes into account the value of the corresponding point's color. Thanks for the suggestion! |
Description of the feature
According to the documentation for
series.bar.dataLabels.color
: https://api.highcharts.com/highcharts/series.bar.dataLabelsIt seems that the contrast color for data label will only exist in
type: column
https://www.highcharts.com/demo/column-comparison
But I think it's also very useful in ordinary bar chart where data labels sometime gets pushed into the bar:
https://codesandbox.io/s/elated-jones-i5y7qo?file=/src/App.js:774-784
Is it possible to apply this auto contrast color for dataLabel in bar chart? Or are there any workarounds that you'd suggest me to try it out?
Library related to the feature
Highcharts
Proof of Concept/Live example for the feature
https://codesandbox.io/s/elated-jones-i5y7qo?file=/src/App.js:774-784
You can vote for this feature by adding a thumbs-up reaction to this post.
The text was updated successfully, but these errors were encountered: