Page 1 of 1

Legends with check boxes

Posted: Tue Oct 02, 2007 6:44 am
by 10546846
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

Posted: Tue Oct 02, 2007 7:51 am
by 10546846
I should post here more often, as soon as I do I discover a solution;)

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

Posted: Tue Oct 02, 2007 7:53 am
by yeray
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;