Vanishing Legend

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
neo
Newbie
Newbie
Posts: 17
Joined: Tue Jul 19, 2005 4:00 am

Vanishing Legend

Post by neo » Tue Nov 28, 2006 11:02 pm

Hello,

I have a TChart with multiple TLineSeries. I have control that assigns a TCategoryItem to a TLineSeries. That TCategoryItem will decide whether TLineSeries.Visible is true or false. Since I inherited a lot of this code I'm faced with some confusing behaviour. I'm not sure if it's related to my control or the TChart. If I disable any lineseries (TLineSeries.Visible := false) except the first one in the TCategoryItems list - the legend remains; however, if I disable the first TCategoryItem from the list the legend disappears. What controls whether or not this legend is visible? How can I override this so I can figure out what's going on?

I can provide a screen capture if necessary. Just let me know where to dump it.

Thanks

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Wed Nov 29, 2006 7:34 am

Hi.

If you're using multiple series then the solution to your problem might be setting chart Legend.LegendStyle property to lsSeries:

Code: Select all

Chart1.Legend.LegendStyle := lsSeries;
Marjan Slatinek,
http://www.steema.com

neo
Newbie
Newbie
Posts: 17
Joined: Tue Jul 19, 2005 4:00 am

Post by neo » Fri Dec 01, 2006 2:42 pm

Thanks for the response.

I've tried your suggestion. Unfortunately it didn't make a difference. Let me know if you have any other suggestions.

Thanks

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 Dec 01, 2006 2:50 pm

Hi neo,

TeeChart's default behaviour is that the legend is visible while there's, at least, one active series in the chart. Couldn't it be that disabling the first series in your TCategoryItem disabled the other series that it contains?

If the problem persists please send us a simple example project we can run "as-is" to reproduce the problem here.

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
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

Post Reply