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

折叠条形图 怎么对特定的值进行颜色的区分 #3562

Closed
1 task
yehoan opened this issue Aug 7, 2021 · 1 comment
Closed
1 task

折叠条形图 怎么对特定的值进行颜色的区分 #3562

yehoan opened this issue Aug 7, 2021 · 1 comment

Comments

@yehoan
Copy link

yehoan commented Aug 7, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

当值为负数的时候需要颜色上面的区分 这个直接使用color 数据不对

Environment Info
g2 4.1.23
System win10
Browser -
@pearmini
Copy link
Member

把代码替换成下面试试?

chart
  .point()
  .position('month*temperature')
  .color('city*temperature', (_, t) => t > 0 ? 'steelblue' : 'orange')
  .shape('circle');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants