Percentage in slices showing outside ring fragments

Percent Google Pie Chart Shows the appearance of the fragments., I want to show the percentage, like a slice of red.

enter image description here

-1
source share
1 answer

Your chart size is too small for this font size.

One option is to change the property fontSize. This is the default font size. This will affect everything.

Another is a fontSizeproperty change pieSliceTextStyle. For example:

    var options = {
        title: 'Chart Title',
        pieHole: 0.4,
        pieSliceTextStyle: {
            fontSize: 7
        }
    };

Choose the font size that suits you.

See google docs for chart configuration options

+1
source

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


All Articles