Lemo
Lemo

Reputation: 519

Google Pie Chart show both Percentage and Values

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

Upvotes: 14

Views: 31136

Answers (3)

Vinicius
Vinicius

Reputation: 133

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

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

Upvotes: 0

user4756986
user4756986

Reputation: 456

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/

Upvotes: 44

HRISHIKESH BARHATE
HRISHIKESH BARHATE

Reputation: 21

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

Upvotes: 2

Related Questions