Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCRTGraph for Java
 Preloading a scrolling graph

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
daviddu@cctexas.com Posted - 19 Aug 2007 : 12:44:21
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
3   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 21 Aug 2007 : 16:26:28
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);


daviddu@cctexas.com Posted - 21 Aug 2007 : 16:20:40
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
quinncurtis Posted - 19 Aug 2007 : 14:38:18
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.

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