正如我在評論中提到,目前的定位回調不影響拆分工具提示。但是,可以覆蓋負責渲染拆分工具提示的功能。它需要你自己計算位置。
如果你想要一個分割工具提示在左上角,就像在你的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
我已更新我的問題;微笑; –