[英]Google Pie chart: remove white gap between pie slices
Similar to this question , but for Google Pie Charts: 与此问题类似,但对于Google Pie Charts:
How can I remove the white lines between the slices on a Google Pie Chart: 如何删除Google饼图上切片之间的白线:
On the image above, I want to remove the white space highlighted by the green arrow. 在上图中,我想删除绿色箭头突出显示的空白区域。
You can get rid of that gap by setting the pieSliceBorderColor
to "transparent"
. 您可以通过将pieSliceBorderColor
设置为"transparent"
来消除这种差距。 Try the following on Google Code Playground : 在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"});
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.