回答
我在这样的情况下发现,这是最好的手动定位提示:
http://api.highcharts.com/highcharts#tooltip.positioner
这样一来,不需要的隐藏是可控的。
编辑:
如果要扩展工具提示的原型,你可以操纵X和Y
Tooltip.prototype.move = function (x, y, anchorX, anchorY) {
var tooltip = this,
now = tooltip.now,
animate = tooltip.options.animation !== false && !tooltip.isHidden;
if(x > ?????)
{
x = x - 50; // or how ever many pixels you want to move it to
}
// get intermediate values for animation
extend(now, {
x: animate ? (2 * now.x + x)/3 : x,
y: animate ? (now.y + y)/2 : y,
anchorX: animate ? (2 * now.anchorX + anchorX)/3 : anchorX,
anchorY: animate ? (now.anchorY + anchorY)/2 : anchorY
});
// move to the intermediate value
tooltip.label.attr(now);
// run on next tick of the mouse tracker
if (animate && (mathAbs(x - now.x) > 1 || mathAbs(y - now.y) > 1)) {
// never allow two timeouts
clearTimeout(this.tooltipTimeout);
// set the fixed interval ticking for the smooth tooltip
this.tooltipTimeout = setTimeout(function() {
// The interval function may still be running during destroy, so check that the chart is really there before calling.
if (tooltip) {
tooltip.move(x, y, anchorX, anchorY);
}
}, 32);
}
}
谢谢!这似乎很接近。有没有办法返回工具提示的位置值?说如果它<=图表区域边缘,然后修复到固定位置,否则正常显示 –
从来没有尝试过,但我相信你可以覆盖定位器的方法。看看Highcharts的来源。 – DeweyOx
嗯,有没有办法找到x,y pos的点? –
- 1. HTML链接标题atrribute tooltip Internet Explorer 8
- 2. 如何做[?]解释/'tooltip'链接?
- 3. 链接中的漂亮URL在链接
- 4. 在Rails URL中链接标签链接
- 5. jQuery Tools Tooltip在链接点击后未检测到悬停
- 6. 链接的URL @
- 7. URL链接
- 8. asp:ImageButton链接URL
- 9. MVC - URL链接
- 10. Neo4j url链接
- 11. 转义URL链接
- 12. 模糊链接url
- 13. 贝宝url链接
- 14. 链接#div和URL
- 15. jQuery Popover/Tooltip中的链接不适用于jQuery SmoothScroll?
- 16. 带有CSS Tooltip的HTML5(php)显示远离超链接
- 17. 我想分页url与codeiginter中的链接href url链接
- 18. jQuery Tooltip保持打开,如果它在iframe中的链接(在FF&IE中)
- 19. 将URL转换为链接,除非已经存在链接
- 20. 在应用程序中链接的自定义URL链接
- 21. 在链接中发布标题,描述和链接的URL
- 22. URL链接不会显示在Facebook上链接的缩略图
- 23. AngularJS Tooltip tooltip-is-open not working
- 24. 获取URL路径URL链接(PHP)
- 25. IIS URL重写URL链接与%3D
- 26. 更改URL站点链接
- 27. jquery链接和URL哈希
- 28. HTC OpenSense SDK repository.xml url链接
- 29. 如何将'URL#header4`链接
- 30. AngularJS删除URL链接#
工具提示的用于显示点的信息。如果你想要这样的东西,我建议你在用户点击这个点时显示它,这样你就可以毫无问题地点击工具提示内容。 –
有完全相同的问题,这解决了它,因为我只在手机上使用highcharts,它没有任何区别,如果我overing或点击:http://stackoverflow.com/questions/24204419/highcharts-show-tooltip- on-point-click-instead-mouseover – luiscvalmeida