Pie Charts if all the data are 0, should show blank, not evenly divided the pie.
See original GitHub issue问题简述 (One-line summary)
If there are for example 4 data elements and the values are all 0, it should show a blank pie, not a pie evenly divided by 4.
版本及环境 (Version & Environment)
- ECharts 版本 (ECharts version): v3.1.10
- 浏览器类型和版本 (Browser version): any browser
- 操作系统类型和版本 (OS Version): windows7
current pie chart:
重现步骤 (Steps to reproduce)
1.use the option provided to draw the piechart
期望结果 (Expected behaviour)
可能哪里有问题 (What went wrong)
When sum is 0, assume all the parts are 2pi/N. In fact, 0 means occupy nothing no matter sum is 0 or not. The user should see nothing except the circle boundary to show no data at all.
ECharts配置项 (ECharts option)
option = {
series: [
{
type: "pie",
radius: "65%",
itemStyle: {
normal: {
borderColor: '#fff',
borderWidth: '0'
},
emphasis: {
borderColor: '#fff',
borderWidth: '0'
}
},
label: {
normal: {
show: false
}
},
center: ["50%", "43%"],
data: [
{
"name": "21-40%",
"value": "0"
},
{
"name": "41-60%",
"value": "0"
},
{
"name": "61-80%",
"value": "0"
},
{
"name": "81-100%",
"value": "0"
}
]
}
],
color: [
"#FF8C00",
"#FFD700",
"#6B8E23",
"#3D3D3D"
],
title: {
show: true,
text: "Sample",
left: "center",
top: "top"
},
legend: {
data: [
"21-40%",
"41-60%",
"61-80%",
"81-100%"
],
left: 'center',
bottom: '10',
borderWidth: 1,
borderColor: '#FAAC58',
},
tooltip: {
show: true,
showContent: true,
trigger: 'item',
formatter: '{b}:<br />{c}',
}
}
其他信息 (Other comments)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:9
Top Results From Across the Web
Pie Charts if all the data are 0, should show blank, not evenly ...
If there are for example 4 data elements and the values are all 0, it should show a blank pie, not a pie...
Read more >Is it possible to show pie chart if all data are 0 - Stack Overflow
You cannot, and this because of the very nature of the pie chart. A pie chart angle is calculated (in degrees) by the...
Read more >How-to Easily Hide Zero and Blank Values from an Excel Pie ...
Checkout the Step-by-Step Tutorial and Download the Free Sample File here: http://www.exceldashboardtemplates.co... … Show more. Show more ...
Read more >A Complete Guide to Pie Charts | Tutorial by Chartio
Pie charts are a common but often misused visualization to show division of a whole into parts. Learn how to get the most...
Read more >pie chart extracted values - Microsoft Power BI Community
Pie chart will always aggregate the data on category level. So when you put Answer into Pie chart, it will count the number...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am also facing the same issue. please fix it in the next release
+1