1
votes

Piechart sliceLabel is not shown for smaller slices.

My piechart image looks like :

https://drive.google.com/file/d/0B1dlb5k9SpLPYXJRRmRXSkpTUXM/view?usp=sharing

ActualRequired Piechart should like: https://drive.google.com/file/d/0B1dlb5k9SpLPOFBzNUw2Tkdsblk/view?usp=sharing

Code Snippet :

var dataTest = google.visualization.arrayToDataTable([ ['Country','Population'], ['India', 10], ['Australia', 1], ['Sri Lanka', 5.3], ['New Zeland', 9], ['Others', cell[0][5]], ]);

google.visualization.PieChart(document.getElementById('popStat')).draw(dataTest,{sliceVisibilityThreshold:0,chartArea:{left:'15%',top:'15%',width:'100%',height:'100%'}, title: 'Population Stats',});

1

1 Answers

0
votes

It is because the slice relative part, below which a slice will not show individually. All slices that have not passed this threshold will be combined to a single slice, whose size is the sum of all their sizes. Default is not to show individually any slice which is smaller than 1/2 degree. You can modify the sliceVisibilityThreshold to change this effect. You can just set the sliceVisibilityThreshold option to 0. This will force all the legends to show. See the reference: https://developers.google.com/chart/interactive/docs/gallery/piechart