正如我在评论中提到,目前的定位回调不影响拆分工具提示。但是,可以覆盖负责渲染拆分工具提示的功能。它需要你自己计算位置。
如果你想要一个分割工具提示在左上角,就像在你的fiddle 你需要覆盖Highcharts.Tooltip.prototype.renderSplit = function(labels, points)
与每个框的所需位置。
var yPos = 0;
each(boxes, function(box, i) {
var point = box.point,
series = point.series;
// Put the label in place
box.tt.attr({
// visibility: box.pos === undefined ? 'hidden' : 'inherit',
x: (rightAligned || point.isHeader ?
//box.x :
0 :
point.plotX + chart.plotLeft + pick(options.distance, 16)),
// y: box.pos + chart.plotTop,
y: yPos,
anchorX: point.isHeader ?
point.plotX + chart.plotLeft : point.plotX + series.xAxis.pos,
anchorY: point.isHeader ?
box.pos + chart.plotTop - 15 : point.plotY + series.yAxis.pos
});
yPos += box.size;
});
例如:http://jsfiddle.net/tbguemvL/
你所说的 “分裂” 是什么意思? – wergeld
定位器无法使用拆分工具提示。你可以使用distance属性:http://jsfiddle.net/zefz1u5e/1/你究竟想要定位工具提示? – morganfree
我已更新我的问题;微笑; –