答案 0 :(得分:0)
应该可以使用connectorPath,内部Highcharts函数来更改三角形的连接器路径:
var H = Highcharts,
pick = H.pick;
H.seriesTypes.pie.prototype.connectorPath = function(labelPos) {
var angle = labelPos[7],
x = labelPos.x,
y = labelPos.y,
M = 'M',
L = 'L';
return [
M,
x - Math.cos(angle) * 20, y - 20 * Math.sin(angle),
L,
labelPos[4] - Math.cos(angle - Math.PI / 3) * 20, labelPos[5] - 20 * Math.sin(angle - Math.PI / 3),
L,
labelPos[4] - Math.cos(angle + Math.PI / 3) * 20, labelPos[5] - 20 * Math.sin(angle + Math.PI / 3),
L,
x - Math.cos(angle) * 20, y - 20 * Math.sin(angle),
];
};
实例:
答案 1 :(得分:0)