Page 1 of 1

An easy way to toggle the visibility of series?

Posted: Fri Nov 02, 2007 9:42 am
by 9341477
Hi,

I have to visualize a dependence of several kinds of data on time. For example, A=A(time), B=B(time), C=C(time) and so on. Bottom axis shows the time and the left axis shows the data series, be it A, B, C etc. I have a legend with check boxes that user can use to toggle the visibility of the series A, B and C. So far, so good.

Now, things are getting a bit complicated. The above data trends (A, B, C) are related to a single "channel", but I now need to display the data coming from multiple channels in the same chart. The approach I took uses the bottom axis as a time axis that is shared among all series and I created a given number of custom vertical axes (one custom axis per channel). So for example, if there are 5 channels and I have 3 data series per channel (A, B, C), it totals to 3x5=15 series per chart.

Now, my legend shows all 15 series (for all channels), but I'd rather want to show it only A,B,C "group" series. In other words, I'd like to be able to click on the group "A" checkbox in the legend and toggle the visibility of all "A" series for all channels at once. Is there an easy way to achieve this?

Thanks in advance!

Posted: Fri Nov 02, 2007 10:04 am
by narcis
Hi Ivo,

Yes, you can do as in the What's New?\Welcome!\New in Legend\Series Group example at the features demo, available at TeeChart's program group.

Posted: Fri Nov 02, 2007 10:48 am
by 9341477
Hi NarcĂ­s,

Thanks for the suggestion! Do you know if this is supported by TeeChart v7? I'm registered user of version 8 as well but I do not have it installed at the moment (so many things to do before I'll be able to migrate to RAD Studio 2007 and TeeChart v8 ).

Posted: Fri Nov 02, 2007 10:53 am
by narcis
Hi Ivo,

No, this feature was implemented for v8.

Posted: Fri Nov 02, 2007 10:56 am
by 9341477
Ok, then guess what - you have just given me a reason to update my development environment today. :wink:

Re: An easy way to toggle the visibility of series?

Posted: Fri Oct 29, 2010 10:39 pm
by 16856806
Hi,

Is there a way to programmatically modify an individual series' checkbox state? For example, can we set some sort of property to cbChecked or cbUnchecked?

Thanks,

Sajjad

Re: An easy way to toggle the visibility of series?

Posted: Mon Nov 01, 2010 5:58 pm
by narcis
Hi Sajjad,

Yes, try using series' Active or Visible properties:

Code: Select all

Series1.Active:=not Series1.Active;
Hope this helps!

Re: An easy way to toggle the visibility of series?

Posted: Mon Nov 01, 2010 9:04 pm
by 16856806
Thanks Narcis! Worked just fine!