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
 Preloading a scrolling graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

daviddu@cctexas.com

14 Posts

Posted - 19 Aug 2007 :  12:44:21  Show Profile  Reply with Quote
Is there a way to 'preload' a scrolling graph?

Example:
I have a project where I need to display a scrolling line graph of 7-10 traces for the past 7 days of data.

Data is available on 1 minute intervals from my SQL data server (although I may only use 15 minute samples to cut down on the amount of data).

When the program is run, it'll have a large high resolution (I understand the display I'll be using has around 3000 x 2000 pixels), but I need to preload the previous 7 days of data into the graph BEFORE I start the graph scrolling.

Scrolling will be on a 1 minute basis, and the program is expected to run perpetually.

David

David

quinncurtis

1586 Posts

Posted - 19 Aug 2007 :  14:38:18  Show Profile  Reply with Quote
It seems to me that you can "preload" your data using the standard RTProcessVar SetCurrentValue method. That method does not trigger display updates or scrolling.

The ChartView UpdateDraw method triggers a redraw of the graph, displaying the most recent data. If you are continuously feeding in new data, that is what gives the appearance of scrolling.

So, load in all of your data using the RTProcessVar SetCurrentValue method, don't call ChartView UpdateDraw until you are ready to start scrolling. Since your update rate is once a minute, from that point on you would call UpdateDraw once a minute.
Go to Top of Page

daviddu@cctexas.com

14 Posts

Posted - 21 Aug 2007 :  16:20:40  Show Profile  Reply with Quote
Is QCrtGraph going to have any problems dealing with the amount of data I need to graph?

I mean, I'm looking at 10,000 data points per trace, and with 7-10 traces, probably around 100,000 data points total. Is that going to pose a problem?

David

David
Go to Top of Page

quinncurtis

1586 Posts

Posted - 21 Aug 2007 :  16:26:28  Show Profile  Reply with Quote
That's for you to tell us, since we have zero idea of what your target system is.

Performance of the software is entirely dependent on the speed of the host computer. Unless you are running on an extremely slow computer I wouldn't expect you to have a problem.

If the software is to run perpetually make sure you set the RTProcessVar AutoTruncateDataset parameters, so that the internal data storage periodically truncates, to keep the internal buffers from becoming infinitely big. In the example below, every time the internal datasets get to 20,000 points, they auto-truncate back to one screens worth of data, or 10,000 points.

int  numberOfDataPoints =10000
curProcessVar.setAutoTruncateDataset(true);
curProcessVar.setAutoTruncateMaxCount(numberOfDataPoints * 2);
curProcessVar.setAutoTruncateMinCount(numberOfDataPoints);


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