admin管理员组文章数量:1026683
There is always thin sector for 0 (0%) value. How can I hide zero value sector on a pie chart. /
data: [
['Firefox', 100.0],
['Others', 0]
]
Remove this white line
(source: piccy.info)
There is always thin sector for 0 (0%) value. How can I hide zero value sector on a pie chart. http://jsfiddle/t0hgLx2n/
data: [
['Firefox', 100.0],
['Others', 0]
]
Remove this white line
(source: piccy.info)
-
Is using
{ name: 'Others', y: 0, visible: false }
in the data-array considered a solution? Might require some more information on why it cannot just be removed from the data-array, or set to not visible upon creation, if these are not acceptable. – Halvor Holsten Strand Commented Feb 3, 2015 at 15:03 - Your suggestion doesn't work either jsfiddle/4yjn0g5h – iyel Commented Feb 3, 2015 at 16:21
- How does it "not work"? It doesn't show on the pie. What criteria must be met to work? – Halvor Holsten Strand Commented Feb 3, 2015 at 16:39
- Is it the legend item you wish to remove on the picture (where the text "Others" is)? – Halvor Holsten Strand Commented Feb 3, 2015 at 21:56
- legend item and white space – iyel Commented Feb 4, 2015 at 9:36
2 Answers
Reset to default 6This question could be resolved by two parts:
filter zero data
data: [ ['Firefox', 100.0], ['Others', 0] ].filter(function(d) {return d[1] > 0})
remove border in one-slice pie
(please refer to Border in one-slice pie #1828)
http://jsfiddle/Joe_Wu/sub2houn/
It's been a while but if anyone stumbles upon this you have to update Highcharts to at least version 5.
Example
Replace:
<script src="http://code.highcharts./4.0/highcharts.js"></script>
With:
<script src="http://code.highcharts./6.0/highcharts.js"></script>
There is always thin sector for 0 (0%) value. How can I hide zero value sector on a pie chart. /
data: [
['Firefox', 100.0],
['Others', 0]
]
Remove this white line
(source: piccy.info)
There is always thin sector for 0 (0%) value. How can I hide zero value sector on a pie chart. http://jsfiddle/t0hgLx2n/
data: [
['Firefox', 100.0],
['Others', 0]
]
Remove this white line
(source: piccy.info)
-
Is using
{ name: 'Others', y: 0, visible: false }
in the data-array considered a solution? Might require some more information on why it cannot just be removed from the data-array, or set to not visible upon creation, if these are not acceptable. – Halvor Holsten Strand Commented Feb 3, 2015 at 15:03 - Your suggestion doesn't work either jsfiddle/4yjn0g5h – iyel Commented Feb 3, 2015 at 16:21
- How does it "not work"? It doesn't show on the pie. What criteria must be met to work? – Halvor Holsten Strand Commented Feb 3, 2015 at 16:39
- Is it the legend item you wish to remove on the picture (where the text "Others" is)? – Halvor Holsten Strand Commented Feb 3, 2015 at 21:56
- legend item and white space – iyel Commented Feb 4, 2015 at 9:36
2 Answers
Reset to default 6This question could be resolved by two parts:
filter zero data
data: [ ['Firefox', 100.0], ['Others', 0] ].filter(function(d) {return d[1] > 0})
remove border in one-slice pie
(please refer to Border in one-slice pie #1828)
http://jsfiddle/Joe_Wu/sub2houn/
It's been a while but if anyone stumbles upon this you have to update Highcharts to at least version 5.
Example
Replace:
<script src="http://code.highcharts./4.0/highcharts.js"></script>
With:
<script src="http://code.highcharts./6.0/highcharts.js"></script>
本文标签: javascriptHighcharts pie chart hide zero sectorStack Overflow
版权声明:本文标题:javascript - Highcharts pie chart hide zero sector - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745650962a2161315.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论