-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Chart displays incorrect colors for data #6158
Comments
It's because of the default theme of G2 will apply chart.style('fillOpacity', 1); DEMO: https://codesandbox.io/p/sandbox/bar-diverging-stacked-7m7g9k?file=%2Findex.js%3A53%2C1-54%2C1 |
Thank you, this is really helps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
Hello,
While working with g2plot, we have observed that the charts display incorrect colors for the data. Although the colors may appear similar, the hex values are different.
重现链接
No response
重现步骤
Open any chart (for example https://g2plot.antv.antgroup.com/en/examples/more-plots/waterfall/#custom-color).
Use any color picker from the browser page to select a color, check the hex value, and compare it with the hex value passed to the 'color' property - they are different.
预期行为
The hex value of the displayed color is the same as the one passed to the options.
平台
屏幕截图或视频(可选)
补充说明(可选)
In our project, we are utilizing web-safe colors, and from this perspective, maintaining the correct hex value of a color is quite important. We verified this using a color picker with a lens, and consistently found it to be incorrect at each point. Additionally, we checked these colors on a plain canvas, where they appeared as the correct colors we had assigned. It seems that the g2plot process may be altering the colors in some way (perhaps through the use of filters?).
The text was updated successfully, but these errors were encountered: