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

[Bug]: 指定颜色与实际渲染出的颜色不一致 #6610

Open
2 of 10 tasks
xin2014 opened this issue Feb 18, 2025 · 1 comment
Open
2 of 10 tasks

[Bug]: 指定颜色与实际渲染出的颜色不一致 #6610

xin2014 opened this issue Feb 18, 2025 · 1 comment
Labels
waiting for author Further information is requested from the author

Comments

@xin2014
Copy link

xin2014 commented Feb 18, 2025

Describe the bug / 问题描述

https://g2.antv.antgroup.com/manual/core/color
文档中的例子就不一样

Image

Image

Image

Reproduction link / 复现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
@xin2014 xin2014 added the waiting for maintainer Triage or intervention needed from a maintainer label Feb 18, 2025
@antvis antvis deleted a comment from petercat-assistant bot Feb 18, 2025
@interstellarmt
Copy link
Contributor

interstellarmt commented Feb 18, 2025

渲染出来的颜色不一致主要是因为G2的主题内置了不同图形的填充透明度,具体可以阅读这里的代码。非常抱歉!这里的文档描述确实需要补充这一点,因为配置的颜色和最终展示的颜色因为透明度的原因显示的不一样。

你可以手动设置interval的透明度,具体的语法如下:

chart.interval().style('fillOpacity',1);

@interstellarmt interstellarmt added waiting for author Further information is requested from the author and removed waiting for maintainer Triage or intervention needed from a maintainer labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for author Further information is requested from the author
Projects
None yet
Development

No branches or pull requests

2 participants