2011-08-11 52 views
3

我想爲x軸標記提供可靠的工具提示,我在這個演示中基本使用了相同的代碼。Flot:可恢復的x軸標記

http://people.iola.dk/olau/flot/examples/annotating.html

想象一下文本旁邊的垂直線隱藏的,當你將鼠標放在標記,文本都展現出來。這基本上是我想要完成的。我曾嘗試使用flothover事件,但標記不顯示在那些事件中。是否有插件或執行類似操作的內容?

+0

我假設你的意思是plothover而不是flothover?此外,您的實施中的一些代碼可能會有幫助。 – apiri

+0

嘗試http://joeloughton.com/blog/web-applications/flot-plugins-event-graphics/ –

回答

1

嘗試綁定到x軸標記div。

$(".flot-x-axis .tickLabel").bind("mouseover",functionThatDisplaysTooltip);