Skip to content

🐛 [BUG] 饼图显示问题,当data中只有一个元素且不为首元素的值不为0时,渲染后的柄图中存在间隙 #3586

Answered by hustcc
sweetqianba asked this question in Q&A
Discussion options

You must be logged in to vote

符合预期的,原因是每个扇形都有一个默认的 lineWidth 和 stroke,就是白色的边框,即时数据为 0,扇形角度为 0,但是边框还是有的。

设置 lineWidth = 0 就不会有白线。

pieStyle: {
  lineWidth: 0,
}

为什么第一个为 1 的时候,就没有问题,因为第一个数据的扇形为 100%,他的边框直接盖住了其他扇形的边框。

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hustcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #3536 on May 23, 2023 05:41.