Legend: Can not display series name/lastvalue simultaneously

TeeChart for ActiveX, COM and ASP
Post Reply
Jenn
Newbie
Newbie
Posts: 19
Joined: Fri Jul 08, 2005 4:00 am
Location: Logan, Utah United States

Legend: Can not display series name/lastvalue simultaneously

Post by Jenn » Tue Sep 26, 2006 8:51 pm

Hello,

I am using TeeChart Pro v7.0.0.8 and VC++.

I set the Legend Style to "Last Values"
and the Text Style to "Left Value" or "Right Value".

However, I am only seeing the last value, and not the series name as I would expect. Is this a problem with just the VC++ implementation, or could there be another attribute that I need to change.

Currently, I am getting around this problem by changing the series title during run-time to include the series name and data value.

Thank you for your help,

Jennifer Britt

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

Post by Narcís » Wed Sep 27, 2006 9:37 am

Hi Jenn,

Setting legend style to "Last Values" only last value in the series will be displayed. To do something as you request you need to customize the text in the OnGetLegendText event.
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

Jenn
Newbie
Newbie
Posts: 19
Joined: Fri Jul 08, 2005 4:00 am
Location: Logan, Utah United States

Post by Jenn » Thu Sep 28, 2006 9:10 pm

Hi Narcis,

Thank you for your information.

I'm a little confused by by the Help on this topic then. According to the help documentaion, the "TextStyle" property should, (it sounds like), allow us to print both the title and the value.
ltsLeftValue shows the point Value and the point Label.
ltsRightValue shows the point Label and the point Value.

...

These are examples of different Legend's TextStyle values:

ltsPlain Summer
ltsLeftValue 1234 Summer
ltsRightValue Summer 1234
...
TeeChart Pro ActiveX Control Documentation. Copyright 1997-2006 Steema Software SL.
I interpreted this to mean that I could show the series title and the last value simulataneously in the legend. Is the documentation incorrect, am I not interpreting it correctly, or is there another attribute that I am not setting correctly?

Thank you,

Jennifer Britt

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 Sep 29, 2006 8:05 am

Hi Jennifer,

When the help speaks about the "point Label" it means the label you can add to each point when populating the series, not the series title. The "point Value" is the Y value the series has at each point. For example:

Code: Select all

TChart1.Series(0).AddXY PointXValue,PointYValue,PointLabel,Color
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

Jenn
Newbie
Newbie
Posts: 19
Joined: Fri Jul 08, 2005 4:00 am
Location: Logan, Utah United States

Post by Jenn » Tue Oct 03, 2006 7:59 pm

Thank you, Narcis, for the explanation. The documentation makes a lot more sense to me now, and I appreciate your help. I can now get it to do exactly what I want it to do by setting the "label" in the AddXY() routine. Thanks again,

Jennifer Britt

Post Reply