类似于这个问题,但对于谷歌饼图:
如何删除 Google 饼图上切片之间的白线:
在上图中,我想删除绿色箭头突出显示的空白。
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"});
}