Page 1 of 1

Legend Checkbox

Posted: Wed Jan 11, 2012 5:46 pm
by 13052810
Hello,

I'm using VS2010 C#.
Can someone explain how to Check and/or Un-Check a checkbox in the legend?

Thanks!

Re: Legend Checkbox

Posted: Thu Jan 12, 2012 11:53 am
by 10050769
Hello tirby,

If you want add checkboxes in the Legend, you only need use next line of code:

Code: Select all

    tChart1.Legend.CheckBoxes = true;
Using previous code you can Check and Un-Check legendCheckBoxes automatically.

I hope will helps.

Thanks,

Re: Legend Checkbox

Posted: Thu Jan 12, 2012 3:38 pm
by 13052810
Hi Sandra,

No, the check boxes already exsist, I need to check and/or un-check them.
The code below is a way to describe my goal, but doesn't work, or is not supported.

tChart1.Legend.CheckBox(1).Checked = true;

-- or --

tChart1.Legend.CheckBox(1).Checked = false;

How can I accomplish this?

Re: Legend Checkbox

Posted: Fri Jan 13, 2012 3:53 pm
by 10050769
Hello tirby,

I recommend take a look in this here where there are some examples that you can use to achieve as you want.

Thanks,

Re: Legend Checkbox

Posted: Sat Jan 14, 2012 4:23 pm
by 13052810
Sandra,

Thanks for all your help.

Here is the line of code I needed.

tChart1.Series[3].Active = false;

Thanks!

Re: Legend Checkbox

Posted: Mon Jan 16, 2012 9:25 am
by 10050769
Hello tirby,

I am glad that the solution help. :)

Thanks,