antvis/G2

[v5] 图例布局过程中,似乎有残留没有擦除干净 #4666

visiky posted onGitHub


同样的问题出现在以下的 demo 里面:

image

  • 版本:5.0.0-beta.10
  • 代码片段如下:
import { Chart } from '@antv/g2';

const data = [
  { genre: 'Shooter', sold: 350 },
  { genre: 'Sports', sold: 275 },
  { genre: 'Other', sold: 150 },
  { genre: 'Action', sold: 120 },
  { genre: 'Strategy', sold: 115 },
];

const chart = new Chart({
  container: 'container',
});

const TOPN = 2;

chart
  .interval()
  .data(data)
  .encode('x', 'genre')
  .encode('y', 'sold')
  .encode('color', (_, index) => (index > TOPN - 1 ? 'low' : 'high'))
  .scale('color', {
    domain:['high', 'low'],
    range: ['red', 'blue'],
  });

chart.render();

@xiaoiver 有空可以看一下?

posted by pearmini about 2 years ago

文本没展示全的问题已经解决: https://github.com/antvis/G/issues/1313

posted by xiaoiver about 2 years ago

Fund this Issue

$0.00
Funded

Pull requests