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

🐛 [BUG] G2Plot 漏斗图在数据为空时候会报错 #2616

Closed
mumu-baba opened this issue Jun 8, 2021 · 2 comments · Fixed by antvis/util#63 or #2658
Closed

🐛 [BUG] G2Plot 漏斗图在数据为空时候会报错 #2616

mumu-baba opened this issue Jun 8, 2021 · 2 comments · Fixed by antvis/util#63 or #2658
Assignees
Labels
Bug Something isn't working

Comments

@mumu-baba
Copy link

mumu-baba commented Jun 8, 2021

🐛 Bug description

官方演示demo 就可以复现,数据给空就行

💻 Link to minimal reproduction

https://g2plot.antv.vision/zh/examples/case/statistical-scenario#trend-funnel

📷 Step to reproduce

🏞 Expected result

🚑 Any additional [like screenshots]

  • G2Plot Version:latest
  • Platform:
@mumu-baba mumu-baba added the Bug Something isn't working label Jun 8, 2021
@susiwen8
Copy link
Contributor

+1, G2的 漏斗图为空不会报错

@susiwen8
Copy link
Contributor

susiwen8 commented Jun 24, 2021

https://github.com/antvis/G2Plot/blob/master/src/plots/funnel/geometries/basic.ts#L19

应该在这里做个判断,如果 data 是空数组,直接 chart.data([]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants