How to display both Percentage and Values in Google Pie Chart ?
Google Pie Chart show both Percentage and Values
Asked Answered
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.
Where exactly do you enter this snippet in Google Sheets? –
Hyphen
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%)
© 2022 - 2024 — McMap. All rights reserved.
pieSliceText
option to'label'
and thelegend.position
option to'labeled'
, you will see the value on the slice and the percent on the legend label. – Justinn