Google Pie Chart: How can I remove the white line

2019-09-01 02:04发布

问题:

Similar to this question, but for Google Pie Charts:

How can I remove the white lines between the slices on a Google Pie Chart:

On the image above, I want to remove the white space highlighted by the green arrow.

回答1:

Use the configuration option pieSliceBorderColor with the value transparent (see documentation here).

  new google.visualization.PieChart(document.getElementById('visualization')).
  draw(data, {
                pieSliceBorderColor : "transparent", // Add this line
                title : "So, how was your day?"
              }
      );

Before:

After:

Fiddle with it: http://jsfiddle.net/PWc43/