General jfreechart problem about the possibility of interactively changing the displayed curve by dragging the mouse

I have never used JFreeChart before. I was told that this is a pretty good Java charting product.

I have doubts, and I would like to get some advice from someone who already has JFreeChart experience:

is JFreeChart designed only to display a static pre-computed set of values?

Or is there any “fairly simple” way to handle the mouse event (possibly drag and drop) to dynamically change the displayed curves (and, accordingly, the corresponding data set)?

With "pretty easy", I mean to do the following without having to write too many lines of code:

  • Click the displayed chart (for example, a line chart) and determine the closest point of the displayed dataset.
  • Use some kind of drag and drop event to change the value of the dataset according to the mouse movement.
  • Show interactive map interactively
+3
source share
1 answer

JFreeChart, of course, can handle dynamic diagrams, as shown here ; and you can interact in various ways with an existing chart, as shown here .

Addendum: Here are a few more features:

  • The tooltip generator by default displays data when you hover over a point, but you can also provide a custom generator.

  • ChartPanel MouseListener, MouseMotionListener.

  • JWS demo - , . crosshair .

+2

All Articles