Google Pie Chart show both Percentage and Values
Asked Answered
F

3

14

How to display both Percentage and Values in Google Pie Chart ?

Fenn answered 12/3, 2014 at 19:5 Comment(1)
You can't display both on the slice labels, but if you set the pieSliceText option to 'label' and the legend.position option to 'labeled', you will see the value on the slice and the percent on the legend label.Justinn
E
43

You can set pieSliceText as value-and-percentage to display both Value and Percentage.

var options = {
   pieSliceText: 'value-and-percentage'
};
var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);

Please note that this option is currently undocumented (see this), so please use at your own risk.

http://jsfiddle.net/6M2sH/301/

Effervesce answered 7/4, 2015 at 3:27 Comment(1)
Where exactly do you enter this snippet in Google Sheets?Hyphen
V
2

You can not display both on the chart labels. For reference use this

Vienne answered 28/1, 2015 at 5:45 Comment(0)
S
0

you can put isStacked: 'percent' in the option of your chart.

when mouse hover it will showing like this 10 (100%)

Stilbestrol answered 15/1, 2018 at 18:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.