![](/img/trans.png)
[英]How to create in a series multiple data each in a different yaxis using highcharts
[英]Highcharts - multiple yAxis each with its own tooltip
这可能吗?
我已经玩过tooltip.shared
和tooltip.crosshairs
但我无法得到类似的东西。
编辑:像Wunderground的天气预报图表是完美的(尝试“鼠标悬停”图表)
在同步高图中使用tooltip.positioner可能会导致所需的行为。
tooltip: {
positioner: function(labelWidth, labelHeight, point) {
var tooltipX, tooltipY;
tooltipX = point.plotX + this.chart.plotLeft + 20;
tooltipY = point.plotY + this.chart.plotTop - 20;
return {
x: tooltipX,
y: tooltipY
};
}
}
更新工具提示隐藏在最右侧的修复
tooltip: {
positioner: function(labelWidth, labelHeight, point) {
var tooltipX, tooltipY;
if (point.plotX > 340) {
tooltipX = point.plotX + this.chart.plotLeft - 150;
} else {
tooltipX = point.plotX + this.chart.plotLeft + 20;
}
tooltipY = point.plotY + this.chart.plotTop - 20;
console.log(tooltipX);
return {
x: tooltipX,
y: tooltipY
};
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.