5

类似于这个问题,但对于谷歌饼图:

如何删除 Google 饼图上切片之间的白线:

在此处输入图像描述

在上图中,我想删除绿色箭头突出显示的空白。

4

1 回答 1

12

pieSliceBorderColor你可以通过设置to 来消除这个差距"transparent"在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"});
}
于 2013-03-14T13:42:26.737 回答