Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Pie Chart show both Percentage and Values

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

like image 313
Lemo Avatar asked Mar 12 '14 19:03

Lemo


2 Answers

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/

like image 148
user4756986 Avatar answered Sep 20 '22 18:09

user4756986


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

like image 24
HRISHIKESH BARHATE Avatar answered Sep 19 '22 18:09

HRISHIKESH BARHATE