【发布时间】:2013-09-02 20:58:37
【问题描述】:
我有以下饼图:http://jsfiddle.net/wjqrh/76/
new Highcharts.Chart({
chart: {
renderTo: 'f-chart-container',
type: 'pie',
backgroundColor: 'rgba(255, 255, 255, 0)'
},
title: {
text: ''
},
plotOptions: {
pie: {
shadow: true,
dataLabels: {
formatter: function () {
return '<span style="color: ' + this.point.color + '; font-weight: bold; font-size: 115%">'
+ this.point.percentage.toFixed(1)
+ '%</span>';
},
distance: 3,
connectorWidth: 0,
x: 0,
y: 0
}
}
},
tooltip: {
formatter: function () {
return '<b>' + this.point.name + '</b>: '
+ this.point.y
}
},
series: [
{
name: '',
data: data,
size: '73%',
innerSize: '50%',
showInLegend: false
}
],
colors: colors
});
紫色扇区的标签放置在正确的位置,但我想将其准确放置在中心,就像显示第三个(绿色)扇区的标签一样。 橙色和青色扇区也发生了相同的标签定位。
如何强制将标签放置在扇区的中心?
【问题讨论】:
标签: highcharts