I want to display the count of the specific list items on the Google Visualization Pie Chart.

Right now, when I mouse-over on the pie chart I am able view both the percentage and count of the specific list items, but I want the count to be displayed always. Is this anything to do with configuration of chart or the code?

Can anyone help me out?

  • you can create a calculated column in your SPList which provides the totalcount and refer this columnname in your js code that emits the google chart. – userAZLogicApps Feb 3 '16 at 7:18

If you want to show the total number of items shown in a pie chart you can use the DataTable class's getNumberOfRows() method to get the number and then display this number somewhere on the page next to the pie chart.

See reference here:


If what you meant is you want each slice on the pie to show the count of items then just set the appropriate option for the pie chart like so:

var options = {
        pieSliceText: 'value',

Reference for this is here:


Not the answer you're looking for? Browse other questions tagged or ask your own question.