Last updated: 5th May 2026
In an earlier post, I demonstrated how to create dynamic Google Pie Charts using data sourced from an SQL Server database through a Web API. Since then, many readers have asked how to display both percentage values and actual figures on each slice of the pie chart. In this article, I’ll show you exactly how to do that using the pieSliceText configuration option in Google Charts.
In my previous post, I used the pieHole 🍩 option in Google Charts to transform a regular Pie Chart into a sleek Donut Chart, essentially a pie chart with a hole in the middle. By default, these charts display percentage values on each slice. Take a look at the figure below 👇 to see this default behavior in action. 
How to show Value and Percentage in Pie charts?
To display both actual values and percentages on a Google Pie Chart, simply use the pieSliceText configuration option and set its value to value-and-percentage. This powerful setting lets you show a combination of numerical data and percentage share on each slice, making your chart both informative and visually clear.
👉 Please Note: Small slices won’t show text. It means, if slices are too small, labels may disappear entirely. See the above image (the 1st image). The "orange" colored slice does not any value. But it still works. Check this out.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
</head>
<body>
<div id="chart" style="width:600px; height:400px;"></div>
</body>
<script>
// Visualization API and the pie chart package.
google.charts.load("visualization", "1", { packages: ["corechart"] });
google.charts.setOnLoadCallback(DrawPieChart);
function DrawPieChart() {
// Define data.
var arrSales =
[
['Month', 'Sales Figure'],
['JAN', 21],
['FEB', 56],
['MAR', 14],
['APR', 61],
['MAY', 45]
];
// Chart options.
var options = {
title: 'Monthly Sales',
is3D: true,
pieSliceText: 'value-and-percentage'
};
var figures = google.visualization.arrayToDataTable(arrSales);
// WHERE TO SHOW THE CHART (DIV ELEMENT).
var chart = new google.visualization.PieChart(document.getElementById('chart'));
// DRAW THE CHART.
chart.draw(figures, options);
}
</script>See the options variable in the script and see how I have used "pieSliceText" option. I have an array with "month" and "sales figures" (in numbers). When you load the page without using the pieSliceText option, it will show the "percentage" (of total values) on each slice. This is its default behavior.
Note: If you are using dynamic data for your Google charts, you’ll have to define this option.
🚀 Find percentages, change, discounts, and more. Try our 3 Way Percentage Calculator.
Configuration option, pieSliceText
The configuration option "pieSliceText" is used to define the content of the text displayed on the slice. You can define it using "four" values.
• percentage: Shows the percentage of the slice size. For example,
var options = {
pieSliceText: 'percentage'
};• value: Shows values in each slice. For example, pieSliceText: 'value'
• label: The name of each slice. The name of label is also shown at right side of the chart. See the first image above.
var options = {
pieSliceText: 'label'
};• none: Use this option to hide texts on the slices. Show nothing if you wish.
• value-and-percentage: Finally, you can use this option to show both "percentage" and "value" on each slice. Like I have used in my example above.
var options = {
pieSliceText: 'value-and-percentage'
};Browser Support:
Chrome 39.0 - Yes | FireFox 34.0 - Yes | Internet Explorer 10 - Yes | Safari - Yes
Make Charts online using our Graph Maker:
Transform raw JSON data into dynamic, interactive visualizations with ease! Using this powerful charting tool, you can generate a wide range of charts - Pie Charts, Line Graphs, Column Charts, and more - all in real time.
Turn raw JSON data into meaningful charts.
Try the Graph Maker ➪
