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

G2基础饼图显示问题 #3978

Closed
1 task
raylx opened this issue Jun 13, 2022 · 1 comment
Closed
1 task

G2基础饼图显示问题 #3978

raylx opened this issue Jun 13, 2022 · 1 comment

Comments

@raylx
Copy link

raylx commented Jun 13, 2022

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

Reproduction link

https://g2.antv.vision/zh/examples/pie/basic#labelline@

Steps to reproduce

饼图取消勾选某个事例后,事例标签实际未从页面消失,只是被其他事例覆盖一部分,所以会出现类似重影的bug。
image

Environment Info
g2 4.2.2
System windows
Browser Chrome
@hustcc
Copy link
Member

hustcc commented Jun 22, 2022

感谢反馈,这个问题真有点奇怪。解法如下:

const chart = new Chart({
  container: 'container',
  autoFit: true,
  height: 500,
  localRefresh: false, // 增加这里
});

大概能知道是什么问题,底层 G 渲染的时候,会根据变化区域去做按需渲染,然后因为变化区域的大小计算有 0.5px 像素的差别,导致画布上又少量区域没有擦除重新渲染。

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

No branches or pull requests

2 participants