문제

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

도움이 되었습니까?

해결책

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/

다른 팁

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

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top