trend cursor

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
gumshoe
Posts: 80
Joined: Mon Jul 12, 2004 6:06 pm

trend cursor

Post by gumshoe » Mon Jul 12, 2004 6:14 pm

Hi,

I could not find any mention of trend cursors in the forums or in the examples. Do they exist? If not has anyone made one?

A trend cursor is a vertical bar on an XY plot that can be moved around. Values under the bar are displayed in seperate components. They are essential for displaying historical data (X axis is time).

Perhaps JFreeChart calls them by another name, I can only hope.

Thanks.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Jul 12, 2004 11:45 pm

You might be able to get away with using crosshairs to do this. There are a couple of demos included in the "premium" demo collection (available with the JFreeChart Developer Guide) that you might want to look at:

CrosshairDemo1.java
CrosshairDemo2.java
CrosshairDemo3.java
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

gumshoe
Posts: 80
Joined: Mon Jul 12, 2004 6:06 pm

Post by gumshoe » Tue Jul 13, 2004 5:48 pm

I just bought the book and CrosshairDemo1.java appears to suit my needs at first glace. Thanks for your quick reply.

RCDran
Posts: 29
Joined: Wed Feb 25, 2004 4:18 am
Location: Japan

Post by RCDran » Thu Jul 15, 2004 1:35 am

You can use Horizontal/Vertical Trace if you really want to use move instead of click. But there are down sides for this, repaint() may not work as expected.

Refer to my work around :
http://www.jfree.org/phpBB2/viewtopic.p ... ght=#27132
--
RCDran

gumshoe
Posts: 80
Joined: Mon Jul 12, 2004 6:06 pm

Post by gumshoe » Thu Jul 15, 2004 4:58 pm

Thanks for all the help. I am presently evaluating JFreeTrend for use in an HMI. It seems to be holding up fine on the performance end so far, a timeseries chart with 4 series each with 1440 data points still manages a 1 second refresh rate on the target hardware.

As for functionality I will need to add mulitple trend cursors that can then be dragged around the chart with the mouse because having a JSlider for each trend cursor will eat up too much screen real estate. The trend cursors will have to be dynamically added with a double click action and each will result in a popup dialog containing a table showing the data for all the series under the trend cursor.

If you see anything in the above requirements that is impossible due to architectural reasons please let me know.

Thanks again.

Locked