antvis/G2

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

yehoan posted onGitHub

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

Edit on CodeSandbox

Steps to reproduce

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

Environment Info
g2 4.1.23
System win10
Browser -

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


把代码替换成下面试试?

chart
  .point()
  .position('month*temperature')
  .color('city*temperature', (_, t) => t > 0 ? 'steelblue' : 'orange')
  .shape('circle');
posted by pearmini over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests