Display Label?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
DClark
Newbie
Newbie
Posts: 9
Joined: Fri Nov 15, 2002 12:00 am
Location: New Mexico USA

Display Label?

Post by DClark » Thu Jul 29, 2004 2:49 pm

What is the purpose of the 'AXLabel' parameter, for example:

series->AddXY(x, y, "Label", clTeeColor);

I cannot figure out how to get the "Label" text to display along with the point, using a TLineSeries, TeeChart Pro 5.03 and BCB 6 Enterprise.

Thanks.
-Dean

Pep
Site Admin
Site Admin
Posts: 3298
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jul 30, 2004 8:55 am

Hi Dean,

setting the labels in the AddXY method should be showed automatically on the XAxis, but just to make sure, set the XLabels Style to talText :
Chart1->BottomAxis->LabelStyle=talText;

DClark
Newbie
Newbie
Posts: 9
Joined: Fri Nov 15, 2002 12:00 am
Location: New Mexico USA

Post by DClark » Fri Jul 30, 2004 2:46 pm

I'm sorry, I wasn't being clear. I want to display the value of (some of the) plot points next to the point itself, not on the axis. I have tried using Marks but that seems to be an all or nothing proposition.

Of course I can write my own code to display text next to certain points, but it seems such a simple and common thing, I assumed there would be something straightforward built into TeeChart to do it. I just haven't been able to find it yet.

Thanks again.
-Dean

Pep
Site Admin
Site Admin
Posts: 3298
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jul 30, 2004 5:33 pm

Hi Dean,

ok, in this case, if you want to show the Point Values next to it you can use the Marks setting the style to the marks :
Series1.Marks.Visible := true;
Series1.Marks.Style := smsValue;

And also you can customize them (shape, text,...).
Also, if you want to change the Mark text you can use the OnMarkText event

Also, there're another ways to acomplish this, like using Annotation tools or simply adding text using the Canvas techniques.

Post Reply