antvis/G2

Funnel自定义色块 #6519

jiangtianbo posted onGitHub

Funnel 组件自定义颜色失败


已经测试:

  • ❌ 使用 scale 色板设置不生效。这个待排查一下。
.scale('action', {
  palette: 'pastel1'
})
  • ✅ 使用主题设置生效:
chart.theme({
  category10: ['red', 'blue'],
  category20: ['red', 'blue'],
})
  • ✅ 使用 style 颜色设置生效
.style('fill', (d) => {
    return d.pv > 10000 ? 'red': 'blue';
  })
posted by hustcc 5 months ago
posted by hustcc 5 months ago

Fund this Issue

$0.00
Funded

Pull requests