Legend Symbols and Values

TeeChart for ActiveX, COM and ASP
Post Reply
MG
Newbie
Newbie
Posts: 7
Joined: Mon Jun 27, 2005 4:00 am

Legend Symbols and Values

Post by MG » Tue Jul 05, 2005 8:59 pm

I have a chart displaying multiple pie graphs. With LegendStyle set to lsValues (2), the legend displays the color smybol, value (first series), and title. Obviously, the values should not be displayed as this is a multiple chart. If I set LegendStyle to anything else, the symbols are not displayed. The legend seems meaningless to me without the symbols. How can I display the symbols and titles but NO values?

MG
Newbie
Newbie
Posts: 7
Joined: Mon Jun 27, 2005 4:00 am

Post by MG » Wed Jul 06, 2005 3:02 pm

I tried using OnGetLegendText as per another thread in this forum. The code is fired correctly, but the changes made to the LegendText var are not displayed. I use the ByRef in the function code, but it seems there is no passing by reference in html script. I'm really stuck!

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

Post by Narcís » Thu Jul 07, 2005 10:42 am

Hi MG,

You should do as one of the live ASP examples available at the TeeChart program group. Go to the "Page showing 4 different export formats " example which containsan "OnGetAxisLabel" example. A similar technique will have to be applied here, manually "draw" changes using Canvas methods, as text cannot by passed in html script as you mentioned.
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

MG
Newbie
Newbie
Posts: 7
Joined: Mon Jun 27, 2005 4:00 am

Post by MG » Thu Jul 07, 2005 1:38 pm

Hi,
Sorry, I'm not getting it. The page does not show any pie charts, and I cannot find code that alters the legends; in fact, no mention of OnGetAxisLabel. So I'm not sure what you mean, here. Unless you're suggesting to draw the entire legend programatically?

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

Post by Narcís » Thu Jul 07, 2005 1:56 pm

Hi MG,

Sorry if I wasn't clear enough in my previous reply. It doesn't mind if series are not pie series as it will be the same. The code you need is at CompareOutput.asp and CompareOutput.inc which you will find at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\IIS & Asp (default english installation path). The code I was referring to is OnBeforeDrawSeries event at CompareOutput.inc which draws "Very bad :-|", "Bad", "OK", "Good" and "Excellent" labels on the left axis. You should do something similar with the legend symbols, custom drawing on the canvas.
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

MG
Newbie
Newbie
Posts: 7
Joined: Mon Jun 27, 2005 4:00 am

Post by MG » Thu Jul 07, 2005 3:09 pm

Hello, again

Ok, I got a workaround. If I set the legends' ColumnWidthAuto to false, and specify top, left, and width values (so I know where the legend is), I can then use Canvas.Textout to place my titles. I use a LegendStyle of 4, which for some reason draws only the colored symbol boxes.
This seems like a lot of trouble just to omit something from the legend which shouldn't be there in the first place. :?

Post Reply