Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCRTGraph for Java
 Changing the size of a time-based x-axis
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

zreynolds

5 Posts

Posted - 31 Mar 2006 :  06:56:23  Show Profile  Reply with Quote
Hello, I'm sure this will be a quick fix, but it's tough to figure out.

I am using a RTScrollFrame to display some time-series data in real time. What I am trying to implement is a rescale of the time axis (x-axis) while the plot is scrolling. For example, changing from an initial 5-second view to a 10-second view.

The following is the code segment that I am using to rescale:

GregorianCalendar time = new GregorianCalendar();
pTransform[ChanNum].setTimeScaleStart(time);
time.add(ChartCalendar.SECOND, (int) range_in_secs);
pTransform[ChanNum].setTimeScaleStop(time);
scrollframe[ChanNum].rescaleAxesToCurrentTransform();

What happens is the chart resizes to the specified time parameter, but once the frame fills with data and starts to scroll, it reverts to its initial settings.

Any ideas on what I need set to make this chart behave?

Zane Reynolds
reynolds@eng.usf.edu

quinncurtis

1586 Posts

Posted - 31 Mar 2006 :  10:28:31  Show Profile  Reply with Quote
The RTScrollFrame controls the axes scaling, so changing the time-axis scale only changes things temporarily until the scroll frame re-asserts its control over the axis.

The scroll frame has a property, frameExtent, that is calculated in the RTScrollFrame constructor, based on the initial extent of the time axis of the coordinate system passed in. This property controls the extent of the time axis for all subsequent scrolling. Unfortunately this property is not public and can't be changed once the initial RTScrollFrame constructor is called.

We have to make an update later today, because of a bug that can prevent the time axis from being displayed when an RT chart is initially drawn. We will include get/set methods in that update to set the RTScrollFrame frameExtent property.

We will post on this thread when the update is on-line. You will be able to just re-download, and re-install the software to get the modifed libraries.
Go to Top of Page

quinncurtis

1586 Posts

Posted - 31 Mar 2006 :  13:54:31  Show Profile  Reply with Quote
We have finished uploading the new libraries. You can get them by downloading the trial version of the software here:
http://www.quinn-curtis.com/downloadsoftware/Trial_QCRTGraphJavaR16x.zip

or by using your original download links from an order.

A couple of methods were added to the RTScrollFrame class: setFrameExtent(double millseconds), which will set the frame extend in milliseconds, and setFrameExtendSeconds(double seconds) which sets the frame extent in seconds.
Go to Top of Page

zreynolds

5 Posts

Posted - 04 Apr 2006 :  06:27:48  Show Profile  Reply with Quote
Thanks for the quick response! I'll be working on incorporating those methods today.

Thanks again,

Zane Reynolds
reynolds@eng.usf.edu
Go to Top of Page

zreynolds

5 Posts

Posted - 04 Apr 2006 :  06:28:56  Show Profile  Reply with Quote
Thanks for the quick response! I'll be incorporating those methods today.

Thanks again,

Zane Reynolds
reynolds@eng.usf.edu
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07