Problem with legend checkboxes

TeeChart for ActiveX, COM and ASP
Post Reply
maxxo
Newbie
Newbie
Posts: 2
Joined: Mon Jul 31, 2006 12:00 am

Problem with legend checkboxes

Post by maxxo » Tue Jun 30, 2009 2:17 pm

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...

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with legend checkboxes

Post by Yeray » Wed Jul 01, 2009 7:39 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

maxxo
Newbie
Newbie
Posts: 2
Joined: Mon Jul 31, 2006 12:00 am

Re: Problem with legend checkboxes

Post by maxxo » Thu Jul 02, 2009 9:06 am

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

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with legend checkboxes

Post by Yeray » Thu Jul 02, 2009 9:40 am

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!
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply