Series version of SaveToStream?

TeeChart for ActiveX, COM and ASP
Post Reply
TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Series version of SaveToStream?

Post by TonyVSUK » Wed Sep 14, 2011 12:57 pm

I use this all the time
COleVariant tStream = pTChart->GetExport().GetAsNative().SaveToStream(TRUE);

But is there something similar for a series only? For example
COleVariant tStream = pTChart->Series(0).GetExport().SaveToStream(TRUE);

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

Re: Series version of SaveToStream?

Post by Narcís » Wed Sep 14, 2011 1:33 pm

Hi TonyVSUK,

I'm afraid not. You should do it manually looping through series ValueLists and add what you need to a memory stream.
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

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Series version of SaveToStream?

Post by TonyVSUK » Wed Sep 14, 2011 1:51 pm

What I really want to do is save the series formats as well as just the values. As there are so many series available in TChart, it's a real pain to try and figure out all the attributes that need saving for each series type.

Another question, is it possible to copy a series from one TChart to another? If yes, I can just store the whole chart as a stream with just the one series in it.

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

Re: Series version of SaveToStream?

Post by Narcís » Wed Sep 14, 2011 1:59 pm

Hi Tony,
Another question, is it possible to copy a series from one TChart to another?
Yes, you can use CloneSeries method, for example.
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

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Series version of SaveToStream?

Post by TonyVSUK » Wed Sep 14, 2011 2:10 pm

But this clones it to the same chart (I've been experimenting with it).

I have two charts, one with the series that I need on the other chart. Can that be done?

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Series version of SaveToStream?

Post by TonyVSUK » Thu Sep 15, 2011 12:14 pm

Or is there an exhaustive list of all the settings that are stored for each series so I could store them?

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

Re: Series version of SaveToStream?

Post by Narcís » Thu Sep 15, 2011 2:31 pm

Hi Tony,

Yes, sorry. I'm afraid such an option doesn't exist with TeeChart ActiveX. With the VCL version you can use Assign or CloneChartSeries methods. I have added your request to the wish-list (TA05015738) to be considered for inclusion in future versions. In the meantime, the only solution, is exporting the entire chart and remove what you don't need.
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

TonyVSUK
Advanced
Posts: 163
Joined: Wed Mar 01, 2006 12:00 am

Re: Series version of SaveToStream?

Post by TonyVSUK » Thu Sep 15, 2011 3:23 pm

I would find the most useful to be a SaveToStream/LoadFromStream and attach/detach to/from chart functions.

It's really difficult to figure out all the different settings for each series to actually store (there are hundreds of them). Load/Save would be an immense help. Or attach/detach from chart as that way I could create an invisible chart, attach the series and store that.

Is it possible to do this using the .NET component?

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

Re: Series version of SaveToStream?

Post by Narcís » Fri Sep 16, 2011 7:18 am

Hi Tony,
I would find the most useful to be a SaveToStream/LoadFromStream and attach/detach to/from chart functions.
Ok, I have updated the item at the wish-list.
Is it possible to do this using the .NET component?
Yes, TeeChart for .NET has the Series.Clone, Series.Assign, Series.AssignFormat and Series.AssignValues methods.
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