Translucent Google PieChart Slice Color

Perhaps there is a Google Chart API PieChart with pieces of translucent color? I can make the fragment completely transparent by passing

slices: { 0: { color: 'transparent' }...

for PieChart, but I can’t find a way to make it translucent. Graphs do not recognize the color value "rgba (0,0,0,0,0)" ("not a valid color string"). I also tried using the third column of the data array by passing "fill-opacity" as follows:

var data =  google.visualization.arrayToDataTable([
    ['Column1', 'Column2', { role:'style' } ],
    ['Val1', 33, 'fill-color: #FF0000; fill-opacity: 0.2'],
    ...

This does not affect the transparency of the slice. PieChart also does not seem to support the new dataOpacity configuration parameter. I am testing the latest version of Google Chrome.

Is there a way to get a translucent piece of google.visualization.PieChart?

Thanks!

+4

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


All Articles