Retrieving series data as a dataset

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
BenW
Advanced
Posts: 119
Joined: Wed Aug 10, 2005 4:00 am

Retrieving series data as a dataset

Post by BenW » Fri Nov 07, 2008 2:40 am

Hello.

Can you please confirm that the following mechanism I'm using is fully supported, and it something that will always be supported.

I'm populating a line series by adding X(time), Y values. These are being added at a frequency say of 20 seconds. I then execute the following code to retrieve the DataSource of the series as a DataSet:

System.Data.DataSet penData = penSeries.DataSource as System.Data.DataSet;

This results in a DataSet retrieved from the series of all the sample pairs it currently contains. Repeating the above command returns the same dataset, even though new samples have been added. In order for me to retrieve the data including the new samples added since the last time the above command was executed, I have to also do the following:

penSeries.DataSource = null;

Only after setting the series DataSource to null, will I be able to retrieve all the samples from the series again.

Is this expected behaviour?

thanks,
Ben.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 07, 2008 9:53 am

Hi Ben,

Could you please send us a simple example project we can run "as-is" to reproduce the issue here and let us know the TeeChart version you are using?

You make an example similar to Christopher Ireland's posted here.

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

BenW
Advanced
Posts: 119
Joined: Wed Aug 10, 2005 4:00 am

Post by BenW » Fri Nov 07, 2008 5:37 pm

Hi Narcís,

I have uploaded the test VS.NET project in a zip file called TeechartSeriestoDataGridView.zip.

If you run the application, you'll see one pen is created and samples (Time, value) are added every 5 seconds. When you click on the "Update Grid' button you'll see that the DataGridView instance will be updated with the entire set of samples contained in the series. If you look at the Click event handler for that button, you'll see how I've done this. Note, the 'nulling' out of the series.DataSource property is key to this functionality working (i.e. getting the full set of samples, the next time the button is clicked).

This functionality is good for our application and I'm hoping that it is officially supported for this version and later versions of the Steema TeeChart. (This version is 2.0.3203.23271/2).

thanks,
Ben.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Nov 10, 2008 11:15 am

Hi Ben,

Thanks for the example project.
Only after setting the series DataSource to null, will I be able to retrieve all the samples from the series again.

Is this expected behaviour?
Yes, this is by design.
Can you please confirm that the following mechanism I'm using is fully supported, and it something that will always be supported.
No. We can confirm that if the behviour is changed then an alternative mechanism will be made available to reproduce it.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply