Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCRTGraph for Java
 Changing the time axis on an RTScrollFrame

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
zreynolds Posted - 18 Jan 2008 : 07:48:47
I am working on an RTScrollFrame that displays data in real-time. It's put together such that each time a packet of data arrives, it adds the data to the RTScrollFrame. Occasionally, there are interruptions in the data, so the display will just wait for more data to arrive. When it does, the labels on the TimeAxis resume from where they were, no longer reflecting the timestamp on the data itself.

So, more technically, adjusting the start and end times on the axes causes the RTScrollFrame to stop responding. Demolishing the whole chart and recreating it also causes the frame to stop responding.

I guess the fundamental question is, what's the best way to change the values on the TimeAxis?

Zane Reynolds
reynolds@eng.usf.edu
2   L A T E S T    R E P L I E S    (Newest First)
zreynolds Posted - 18 Jan 2008 : 13:52:38
I think the essential problem was that I was trying to add data to the chart that was older than the current extent of the chart. I set up the RTScrollFrames with a TimeAxis that has an initial value of the current time. Then I try to adjust the TimeAxis to show the older start time, and that's where the problem occurs.

I ended up using a work-around to solve this problem. Everything works properly when I take the current time initially, and just increment that time every time new data arrives. So, the work around is that I removed the TimeAxisLabels from the RTScrollFrame and used a separate date/time stamp that corresponds to the date stamp that comes with the data.

Thanks for your usual quick response!

Zane Reynolds
reynolds@eng.usf.edu
quinncurtis Posted - 18 Jan 2008 : 09:37:34
We cannot reproduce what you describe.

It sounds like there is something wrong with the way you are using the scroll frame, or are updating the data.

We made a simple modification to the timer1_Tick method in our simple scroll example, ScrollApplication1, to update at a random time interval.

// Update data using 200 msec timer
private void timer1_Tick(ActionEvent e)
{
       // Random data
	currentTemperatureValue1 += 5 * (0.5 - ChartSupport.getRandomDouble());
	currentTemperatureValue2 += 8 * (0.5 - ChartSupport.getRandomDouble());
        counter++;
	double randreal = ChartSupport.getRandomDouble();
	if (randreal < 0.05)
	{
	  currentTemperature1.setCurrentValue(currentTemperatureValue1);
	  currentTemperature2.setCurrentValue(currentTemperatureValue2);
        }
}


The graph updates correctly, the graph scrolls properly, and the axes labels always maintain the proper relationship to the data, even though the updates are completely random and sporatic in time.

See if you can reproduce your problem using that example program.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07