Google Pie Chart: Remove the white gap between pieces of cake

Like this question , but for Google Pie Charts:

How to remove white lines between slices in a Google Pie chart:

enter image description here

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

+5
source share
1 answer

You can get rid of this gap by setting pieSliceBorderColorto "transparent". Try the following on the Google Code Playground :

function drawVisualization() {
  // Create and populate the data table.
  var data = google.visualization.arrayToDataTable([
    ['Task', 'Hours per Day'],
    ['Work', 11],
    ['Eat', 2],
    ['Commute', 2],
    ['Watch TV', 2],
    ['Sleep', 7]
  ]);

  // Create and draw the visualization.
  new google.visualization.PieChart(document.getElementById('visualization')).
    draw(data, {title:"So, how was your day?", pieSliceBorderColor:"transparent"});
}
+11
source

All Articles