Is there a way to update and display x y next to mouse pointer in jfreechart?

邮差的信 提交于 2019-12-13 02:06:53

问题


I would like to display the (x, y) location of the mouse pointer with respect the coordinate system of the current jfree chart. I would like to do this constantly even if the mouse pointer is not set on any part of the graph.

I know I can activate the tooltip the way explained here but that displays the mouse location only if the mouse is on top of a graph point. How can I see the XYs all the time next to mouse pointer (tooltip or something)?


回答1:


As shown here, the coordinates are in the MouseEvent returned by getTrigger() in the ChartMouseEvent sent to a ChartMouseListener.



来源:https://stackoverflow.com/questions/20893480/is-there-a-way-to-update-and-display-x-y-next-to-mouse-pointer-in-jfreechart

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!