Page 1 of 1

Checking/Unchecking all the keys in the Legend

Posted: Fri Mar 05, 2004 11:02 am
by 6921157
Hi,

I was wondering how I could allow the user to check or uncheck all the keys in the legend (hence making all the series visible or invisible).


In one particular chart there are 16 series and the user would only want to view say 2 at a time. He would therefore want to uncheck all of them with one click of a button, and then select the ones he wanted to view, rather than uncheck 14 check boxes in the legend.

Many thanks,

Polly

Posted: Fri Mar 05, 2004 2:41 pm
by Pep
Hi Polly,

you can use the following code :

Code: Select all

For i = 0 To TChart1.SeriesCount - 1
TChart1.Series(i).Active = False
Next i