Page 1 of 1

Problem with legend checkboxes

Posted: Tue Jun 30, 2009 2:17 pm
by 9532021
Hi! (new to this forum...)
I am using TeeChart Pro v7 ActiveX.
I have a chart with several series, which uses legend with checkboxes. I would save the current status at a given moment (which series have been created and which of them are checked) and then I would reproduce exactly the same situation at a later time.
I know about the "series(i).active" property, but I think it is not suitable for my purpose: in fact, it only can let me know if a series is checked or not, but the problem is that, when I re-create the chart, if I set as NOT active the series which were originally unchecked, they will not be shown at all, neither will be shown the legend. I would instead reproduce exactly the original situation: i.e. I would list in the legend ALL the series , even those which were originally unchecked; of course they will have their unchecked checkbox (as in the original status) so that user can easily re-activate the series.

Hope to have been clear enough...

Re: Problem with legend checkboxes

Posted: Wed Jul 01, 2009 7:39 am
by yeray
Hi maxxo,

I've tested the following code and I can see the unselected series in the legend:

Code: Select all

  Dim i As Integer
  For i = 0 To 5
    TChart1.AddSeries scPoint
    TChart1.Series(i).FillSampleValues 25
  Next i

  TChart1.Legend.CheckBoxes = True

  TChart1.Series(3).Active = False
I've also tested saving the chart to a tee file and loading the tee file into an empty chart and it seems to work fine.

If you have any problem applying any of these ideas, please don't hesitate to let us know and, please, try to send us a simple example project we can run as-is here to reproduce the problem here.

Re: Problem with legend checkboxes

Posted: Thu Jul 02, 2009 9:06 am
by 9532021
Hi Yeray!
Thanks for your reply. Yes, it does work. Actually I really don't know how I was managing before and because it didn't work.... Anyway, now it seems that everything is ok. Sorry for not having tested it accurately before disturbing you...
Thanks again

Maxxo

Re: Problem with legend checkboxes

Posted: Thu Jul 02, 2009 9:40 am
by yeray
Hi Maxxo,

Don't worry. It's better to know that the help wasn't really needed than to think that a problem isn't solved!