Page 1 of 1

Series version of SaveToStream?

Posted: Wed Sep 14, 2011 12:57 pm
by 9530487
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);

Re: Series version of SaveToStream?

Posted: Wed Sep 14, 2011 1:33 pm
by narcis
Hi TonyVSUK,

I'm afraid not. You should do it manually looping through series ValueLists and add what you need to a memory stream.

Re: Series version of SaveToStream?

Posted: Wed Sep 14, 2011 1:51 pm
by 9530487
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.

Re: Series version of SaveToStream?

Posted: Wed Sep 14, 2011 1:59 pm
by narcis
Hi Tony,
Another question, is it possible to copy a series from one TChart to another?
Yes, you can use CloneSeries method, for example.

Re: Series version of SaveToStream?

Posted: Wed Sep 14, 2011 2:10 pm
by 9530487
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?

Re: Series version of SaveToStream?

Posted: Thu Sep 15, 2011 12:14 pm
by 9530487
Or is there an exhaustive list of all the settings that are stored for each series so I could store them?

Re: Series version of SaveToStream?

Posted: Thu Sep 15, 2011 2:31 pm
by narcis
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.

Re: Series version of SaveToStream?

Posted: Thu Sep 15, 2011 3:23 pm
by 9530487
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?

Re: Series version of SaveToStream?

Posted: Fri Sep 16, 2011 7:18 am
by narcis
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.