Change the Google pie Chart percentage text Colour

2019-07-04 00:12发布

问题:

How to change the pie chart Percentage colour I want To change the 33.33% in black colour

回答1:

You can change it using option pieSliceTextStyle. For example:

        pieSliceTextStyle: {
            color: 'black'
        }

Note: that will change font color for all slices. See pie chart configuration options.

You can use also option slices with property textStyle to set color for each slice differently: textStyle - Overrides the global pieSliceTextSlice for this slice.