14

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

Lemo
  • 519
  • 1
  • 7
  • 22
  • 3
    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. – asgallant Mar 12 '14 at 20:40

3 Answers3

42

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/

Ajay2707
  • 5,690
  • 6
  • 40
  • 58
user4756986
  • 436
  • 5
  • 3
2

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

Lrrr
  • 4,755
  • 5
  • 41
  • 63
0

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

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

Vinicius
  • 133
  • 5