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.
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.
Share Improve this question asked Sep 14, 2012 at 1:29 juminozjuminoz 3,2187 gold badges37 silver badges57 bronze badges 1- could we see a sample of the data being used? – cchana Commented Sep 14, 2012 at 12:35
2 Answers
Reset to default 6There'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
You can set the sliceVisibilityThreshold: equal to 0 to disable it. You should pass it through a options var. 0.00001 > 0
var options = {
title: 'Popularity of Types of Pizza',
sliceVisibilityThreshold: 0
};
var chart = new
google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);