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

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

Closed
visiky opened this issue Feb 20, 2023 · 2 comments
Closed

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

visiky opened this issue Feb 20, 2023 · 2 comments
Assignees
Labels

Comments

@visiky
Copy link
Member

visiky commented Feb 20, 2023

image

系统:
image
浏览器:Chrome

@visiky visiky added the V5 label Feb 20, 2023
@pearmini
Copy link
Member

同样的问题出现在以下的 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 有空可以看一下?

@xiaoiver
Copy link
Contributor

文本没展示全的问题已经解决:
antvis/G#1313

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

No branches or pull requests

3 participants