Google Pie Chart Legend Type Percentage Label

How to show value instead of percentage Legend type Google Pie Chart Label I want to show a percentage lower than 100% to show 1

 legend: {
 position: 'labeled',
 pieSliceText:"value"                                    
 },

enter image description here

+2
source share
1 answer

legendoption has no property pieSliceText. pieSliceText- selection of the entire pie chart. It seems that there is no way to disable% in the legend, but you can completely disable the legend using:

      legend: {
          position: 'none'
      }

and create your own. How this is done is described in the answer How to add Percentage and Total according to the legend of Google graphic diagrams . You can display your own text with additional information and style.

+3

Source: https://habr.com/ru/post/1524463/


All Articles