我有一個三維餅圖使用highchart插件,我希望把邊界中的每個部分,所以我把以下內容:如何在3d餅圖高圖上設置邊界?
borderWidth: 4,
borderColor: "red"
在plotOptions: pie:
。但恐怕這些部分的邊框顏色與填充的顏色相同。
有什麼辦法可以做到這一點?我不介意邊界是否是白色,但我需要區分這些部分。
這裏是一個的jsfiddle在那裏你可以嘗試:http://jsfiddle.net/qRvn2/
JS
$(function() {
$('#container').highcharts({
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
title: {
text: 'Browser market shares at a specific website, 2014'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
borderWidth: 4,
borderColor: "red",
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
}]
});
});
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-3d.js"></script>
<div id="container" style="height: 400px"></div>
謝謝!它解決了。 – harrison4
@ harrison4:我仍然看到錯誤。這是如何解決的? – Ari
問題已經解決,您可以向我們發送一個帶有無圖表的演示嗎? –