Legends with check boxes

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Sean Murphy
Newbie
Newbie
Posts: 19
Joined: Thu Sep 27, 2007 12:00 am
Location: UK
Contact:

Legends with check boxes

Post by Sean Murphy » Tue Oct 02, 2007 6:44 am

D6, Tchart 8.01, A chart with several series, each series is displayed in the legend whic has check boxes. At run time the user can toggle the check boxes in the legend to toggle display of each series on the chart.

I'd like to be able to set the legend tick box in code, so that when the form first opens I can set the state of the lengend check boxes depending on other conditions.

Can someone tell me how to do-

chart.legend.checkboxstate[0]:=false or similar please.

thanks
Sean

Sean Murphy
Newbie
Newbie
Posts: 19
Joined: Thu Sep 27, 2007 12:00 am
Location: UK
Contact:

Post by Sean Murphy » Tue Oct 02, 2007 7:51 am

I should post here more often, as soon as I do I discover a solution;)

I found series[].active:=false does what I need

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

Post by Yeray » Tue Oct 02, 2007 7:53 am

There isn't a manual control on legend checkboxes but you always can activate/deactivate the series as follows, and the checkboxes will update:

Code: Select all

Chart1.Series[0].Active := false;
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