how to 'slow down' dynamic charting

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
evan
Posts: 14
Joined: Thu Feb 08, 2007 6:26 pm

how to 'slow down' dynamic charting

Post by evan » Sat Feb 17, 2007 5:46 pm

Hi,

My question might seems 'stupid', but the 'problem' I'm having is that I have a dynamic xy chart for my program to show what's going on when it runs, and I set the fixed domain range to 500 points, and it adds one datapoint whenever a new piece of data becomes available, but when I run my program, all I can see is always the last 500 points appear in one go without seeing the actual dynamic action of drawing the graph (the chart is indeed dynamic but it seems my program is just too fast for the chart to show the changes)

so I wonder if there is any way to 'slow it down' so I can actually see the dynamic drawing instead of what I have now (which seems rather static to me). Many 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 Feb 19, 2007 11:33 am

I guess it depends on what is driving the arrival of new data? If you have 500 points available almost instantaneously, then the only way to slow down the updates is to introduce an artificial delay, like causing the update thread to sleep for a fixed number of milliseconds before actually changing the dataset.
David Gilbert
JFreeChart Project Leader

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

Locked