Scrollable dynamic XY/time series graph

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Prakash Dhage

Scrollable dynamic XY/time series graph

Post by Prakash Dhage » Fri Aug 03, 2001 9:45 pm

Hello

I am trying to implement scrollable dynamic XYPlot OR time series graph.

I started a thread to continuously modify the datasource and
put the JFreeChartPanel in a JScrollPane .
Whenever a horizontal value becomes bigger than current horizontal max value on the x-axis I increase the size of the JFreeChartPanel expecting that the expanded graph will scroll but I see that all the ticks gets readjusted and the graph scales in both the directions.
So please advice to get following results

1) The graph scales only in one direction (say x axis) and ticks don't get rescaled instead they get appended as the graph grows.
2) The graph scrolls in one direction

Thank you
Prakash

Dogbert

RE: Scrollable dynamic XY/time series graph

Post by Dogbert » Tue Oct 02, 2001 7:36 pm

I pre-populated my chart with bogus values, then when a new value is added to the data source I prune the old one(s). The end result is that it scrolls as new data is added.

The hard part is zooming/scrolling within the history...

Dogbert

Locked