antvis/G2

Do you want to work on this issue?

You can request for a bounty in order to promote it!

仪表盘自定义颜色显示异常 #4998

guiyinn posted onGitHub

AntV Open Source Contribution Plan(可选)

  • 我同意将这个 Issue 参与 OSCP 计划

Issue 类型

初级任务

任务介绍

设置不同的目标值,自定义颜色渲染方式有差异

企业微信截图_16837050413971

企业微信截图_16837051698726

期望一致

import { Chart } from '@antv/g2';

const chart = new Chart({
  container: 'container',
  theme: 'classic',
  autoFit: true,
});

chart
  .gauge()
  .data({
    value: {
      target: 1,
      total: 3,
      name: 'score',
    },
  })
  .scale('color', {
    domain: [0, 2, 3],
    range: ['#EAEAEA', 'l(0) 0:#1EE7FF 1:#6F42FB', '#EAEAEA'],
  })
  .legend(false);

chart.render();

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests