An easy way to toggle the visibility of series?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

An easy way to toggle the visibility of series?

Post by ibauer » Fri Nov 02, 2007 9:42 am

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!
Ivo Bauer [OZM Research]

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 02, 2007 10:04 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

Post by ibauer » Fri Nov 02, 2007 10:48 am

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 ).
Ivo Bauer [OZM Research]

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 02, 2007 10:53 am

Hi Ivo,

No, this feature was implemented for v8.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

ibauer
Newbie
Newbie
Posts: 35
Joined: Thu Mar 31, 2005 5:00 am
Location: Czech Republic

Post by ibauer » Fri Nov 02, 2007 10:56 am

Ok, then guess what - you have just given me a reason to update my development environment today. :wink:
Ivo Bauer [OZM Research]

sajtab
Newbie
Newbie
Posts: 6
Joined: Thu Aug 26, 2010 12:00 am

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

Post by sajtab » Fri Oct 29, 2010 10:39 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

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

Post by Narcís » Mon Nov 01, 2010 5:58 pm

Hi Sajjad,

Yes, try using series' Active or Visible properties:

Code: Select all

Series1.Active:=not Series1.Active;
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

sajtab
Newbie
Newbie
Posts: 6
Joined: Thu Aug 26, 2010 12:00 am

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

Post by sajtab » Mon Nov 01, 2010 9:04 pm

Thanks Narcis! Worked just fine!

Post Reply