Google Pie Chart not Showing All Data Rows

2019-06-24 14:35发布

问题:

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