Page 1 of 1
Legend: Can not display series name/lastvalue simultaneously
Posted: Tue Sep 26, 2006 8:51 pm
by 9527696
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
Posted: Wed Sep 27, 2006 9:37 am
by narcis
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.
Posted: Thu Sep 28, 2006 9:10 pm
by 9527696
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
Posted: Fri Sep 29, 2006 8:05 am
by narcis
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
Posted: Tue Oct 03, 2006 7:59 pm
by 9527696
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