4

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 With all countries data

Example 2: With some countries filtered out After filtering out some countries

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
  • could we see a sample of the data being used? Commented Sep 14, 2012 at 12:35

2 Answers 2

6

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

Sign up to request clarification or add additional context in comments.

1 Comment

This solved the main part of the issues. The other part was caused by my data source not giving me all rows I expected. I do have the same concern on the calculation as well, but what I do is to leave the smaller slices in "others" slice, which seems to be okay for calculation.
0

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); 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.