Page 1 of 1

loading fastline series faster

Posted: Mon Mar 03, 2008 7:40 pm
by 13048447
Hello,

Environment:
VS2005 VB.Net
Steema for TeeChart .Net V3

I'm not positive what the best question would be, so I'll explain what I'm trying to do first, then mentioin a few questions...

I have a dataset with a large datatable already populated (disconnected)
...this loads pretty fast...way under 1 minute...70k + rows

The schema holds a timestamp, and about 30 other fields of type double
The data is captured 10x/second (10hz) = 600 rows per minute or 36000 per hour

I'm plotting X/Y Values (With x being a DateTime)

The schema has one field [tdate] which is always my datetime
The schema has about 30 other fields that are all type double

At runtime, users are allowed to change which field to plot their series against, and when they change which field to plot the series against, I'm...

a) pen.clear() 'Removing all data from the series
b) pen.YValues.DataMember = "someNewFieldName" 'Defining new datamember
c) pen.XValues.DataMember = "tdate" 'Doubt I need to keep doing this
d) pen.Add(myDataSet.tables("myTable")) 'THIS IS SLOW

So, item d above takes a very long time, I have about 70,000 + rows (if I load 2 hours of data, that's approx 72k rows)

Question: If I define the datamembers for a series, and add a datatable as a datasource, and then change the datamembers but want to use the same datasource, do I need to reload (clear and add) my datatable back into the series? Is there a better option? [What gets loaded via pen.add()]

Question: If my datatable has 30+ fields, and my fastseries is only interested in two columns/fields (datetime = x; other = y) would it load much faster if the datatable only had those two fields? Could I use something like a dataView?

Question: If my datatable has lots of rows (whatever lots is, say, 72,000), but the chart display is only showing 10 minutes of data (~6000 rows), would I be better served only adding data that is viewable in another thread...sounds complicated...but I'd do it if the speed would be better.

any other input would be great,
thanks in advance,
bsierad

ps: The source for the data is in tabbed delimited flat files (with header rows) , and loading this data into an ado datatable is quick and easy. I'm just not sure what the fastest way to load this data into my series is...

I'm using
with me.TChart1
.DrawAllPoints = False
.AutoRepaint = False
.YValues.Order = Steema.TeeChart.Styles.ValueListOrder.None
.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending
end with

Posted: Wed Mar 05, 2008 6:32 pm
by 13048447
When I removed the order on the x axis for my date field

//mvarPens is an array of fastline pens
mvarPens(pen).XValues.Order = Styles.ValueListOrder.Ascending

The speed increased dramatically (a few seconds instead of many many minutes)

thanks anyways

Posted: Thu Mar 06, 2008 8:42 am
by narcis
Hi bsierad,
Question: If I define the datamembers for a series, and add a datatable as a datasource, and then change the datamembers but want to use the same datasource, do I need to reload (clear and add) my datatable back into the series? Is there a better option? [What gets loaded via pen.add()]
Yes, this is possible you can use series' CheckDataSource method to refresh its datasource.
Question: If my datatable has 30+ fields, and my fastseries is only interested in two columns/fields (datetime = x; other = y) would it load much faster if the datatable only had those two fields? Could I use something like a dataView?
Yes, TeeChart doesn't have the intelligence to process only necessary data so providing a bigger dataset will become slower. TeeChart supports DataView as datasource.
Question: If my datatable has lots of rows (whatever lots is, say, 72,000), but the chart display is only showing 10 minutes of data (~6000 rows), would I be better served only adding data that is viewable in another thread...sounds complicated...but I'd do it if the speed would be better.
Yes, this is similar to previous question. The less data you put in the chart, the less data TeeChart has to iterate over.