Trick For Mouse Action Listener on Marker

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sonali
Posts: 14
Joined: Sat Sep 02, 2017 5:58 am
antibot: No, of course not.
Location: india

Trick For Mouse Action Listener on Marker

Post by sonali » Tue Dec 05, 2017 1:00 pm

Is there any way to identify that mouse click on the value marker ? so that we can drag and drop value marker or we can open new popup while on click action on marker.

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Trick For Mouse Action Listener on Marker

Post by paradoxoff » Tue Dec 05, 2017 7:58 pm

Not with a marker, but an annotation should do the job, at least if the plot is an XYPlot. See here. The annotations described in the linked thread support tool tips and entities, which is a prerequisite for some interactivity.

sonali
Posts: 14
Joined: Sat Sep 02, 2017 5:58 am
antibot: No, of course not.
Location: india

Re: Trick For Mouse Action Listener on Marker

Post by sonali » Wed Dec 06, 2017 11:22 am

i had try to set mouse action listener in XYRangeValueAnnotation class but failed! than i had do my job with identify tooltip of annotation object on event listen and chart panel have a option to add mouse listener so right now my job done! XYRangeValueAnnotation do my job because it allowed to set tooltip while value marker not . Thanks paradoxoff :)


i am using JFreeChart 1.0.19 is there any need to move in JFreeChart 1.5.0 right now?

Locked