Google Pie Chart not Showing All Data Rows

邮差的信 提交于 2019-12-10 15:34:01

问题


I'm trying to plot population vs. country name and I found that the Google Visualization library is rendering only the first few (actually number is seemingly random depending on the data I use) and sometime add "Other" entry, but it doesn't actually have the value of the rest of the entries.

Example 1: With all countries data

Example 2: With some countries filtered out

Is there an actual limit on number of rows? Why is it inconsistent? Is there a way to get around it. I know it's difficult to view if I plot population of all countries on a pie chart, but I should at least be able to do it.

My issue that I can't get a hold of the source code so I can't really see what is going on. Anyone has any idea? Worst case, I will have to sort all data and show the ones with highest number of population first, but i really want to avoid doing that.


回答1:


There's an option for sliceVisibilityThreshold, which would probably solve your problem. It's set to 1/720 by default, which is .5%

I tried opening it up to 1/10000 and it did not solve my problem. It puts the tiny slices on the legend, but it's still not using them to calculate the percentage. That's a real problem because the % is also in the data table (that I'm displaying) where it is correct.

-Nicole



来源:https://stackoverflow.com/questions/12417009/google-pie-chart-not-showing-all-data-rows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!