antvis/G2

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

xin2014 posted onGitHub

Describe the bug / 问题描述

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

Image

Image

Image

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 / 其他

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

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

chart.interval().style('fillOpacity',1);
posted by interstellarmt 2 months ago

⚠️ This issue has been automatically closed due to inactivity.

  • If the issue is still relevant and important to you, feel free to:
    1. Reopen with additional information
    2. Create a new issue with updated context
    3. Reference any related issues or discussions

We close inactive issues to keep our backlog manageable and focused on active issues.

Your contribution makes our project better! 🌟


⚠️ 由于长期无活动,此 issue 已被自动关闭。

  • 如果这个问题对您来说仍然重要,您可以:
    1. 重新打开并提供补充信息
    2. 创建一个新的 issue 并更新相关背景
    3. 关联相关的 issue 或讨论

为了更好地维护项目,我们需要定期清理不活跃的问题。

感谢您为开源添砖加瓦!🌟

posted by github-actions[bot] about 2 months ago

Fund this Issue

$0.00
Funded

Pull requests