Google Pie Chart Does Not Show All Data Rows

I try to display the name of the population compared to the name of the country, and I found that the Google Visualization library only displays the first few (in fact, the number seems random depending on the data I use), and someday I add a โ€œdifferentโ€ record, but it actually does not matter the remaining entries.

Example 1: with all country data With all countries data

Example 2: Filtered in some countries After filtering out some countries

Is there an actual line count limit? Why is this inconsistent? Is there any way around this. I know this is hard to understand if I plan the population of all countries in a pie chart, but I should at least do it.

My problem is that I cannot get the source code, so I can not understand what is happening. Does anyone have an idea? In the worst case scenario, I will have to sort all the data and display it with the largest population, but I really want to not.

+4
source share
1 answer

There is an option for sliceVisibilityThreshold, which is likely to solve your problem. The default value is 1/720, which is .5%

I tried to open it before 1/10000, and this did not solve my problem. He puts tiny fragments in the legend, but still does not use them to calculate the percentage. This is a real problem, because% is also in the data table (which I am showing) where it is correct.

-Nicole

+6
source

Source: https://habr.com/ru/post/1434107/


All Articles