Page 1 of 1

Uniquely identifying a series

Posted: Mon Feb 04, 2008 7:40 am
by 9643156
Hello,

using TeeChart ActiveX version 7.0.1.4, I am trying to maintain a link between my TeeChart series and my application-specific plot extensions. This link needs to be persistent, i.e. I must be able to save the TeeChart state to a .tee file and save the extensions state to another file, and still maintain the link when I load these files again.

Currently I am using the ISeries::Name property to store a unique key, which is also stored in my extension object, thus providing the link between the TeeChart series and my extension objects.

My question is then: Does the TeeChart use the ISeries::Name property internally? It does not seem to have any visual effect.

If TeeChart does not use this property internally, I am curious as to why it puts limitations on the format of the string i provide to it - specifically, it seems to get upset when I provide a string containing a GUID/UUID (e.g. 550e8400-e29b-41d4-a716-446655440000). It seems that I am not allowed to specify a string beginning with a numerical character. Also, (as far as I remember) it does not like '-', while '_' is fine.

This is not a big issue for me, but I get a bit insecure in what I am doing, when I see the TeeChart responding like this. I basically just want to know if I can continue using the Name property of ISeries as a place to store my application-specific value, or if there are any better place to store this.

Thank you for your help.

Posted: Mon Feb 04, 2008 2:58 pm
by narcis
Hi Steffen,

Yes, that's because of variable naming limitations in the VCL framework. TeeChart Pro ActiveX is a COM wrapper of the VCL version. You can use series name as you do but for using such characters you'd better use Series.Title.

Posted: Tue Feb 05, 2008 6:41 am
by 9643156
Hi NarcĂ­s,

thank you for your reply.

As far as I can see, the value of the Series.Title attribute is displayed in the chart legend (maybe this can be avoided, but I did not immediately find out), so I am currently using that for more human readable purposes.

I am pretty certain that I can work around the constraints on the characters in the Series.Name attribute. I just want to make sure that using the Series.Name attribute for this purpose will not blow up in my face at some later stage.

Thanks for your help!

Posted: Tue Feb 05, 2008 10:30 am
by narcis
Hi Steffen,
As far as I can see, the value of the Series.Title attribute is displayed in the chart legend (maybe this can be avoided, but I did not immediately find out), so I am currently using that for more human readable purposes.
You can customize legend's text using the OnGetLegendText event.