CustomLegend problem!

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
WarmBooter
Newbie
Newbie
Posts: 33
Joined: Thu Mar 18, 2004 5:00 am
Location: Brasil
Contact:

CustomLegend problem!

Post by WarmBooter » Fri Mar 19, 2004 6:09 pm

Hi!

I'm using ReportBuilder + TeeChart Pro 7.0 (TDBChart)

I have a table with 3 fields : ID, ValueX, ValueY

I want to plot a standard point graphic using ValueX and ValueY as axis values, but I need to display the value of the ID field in the chart legend. I tried to set ID as the LABEL, but it mess the X axis scale. I can have more than one record with the same value for X and Y.

Now I'm trying to use the GetLegendText event, but I could not find a way to know what record in the dataset is being processed when the event is fired and so I cannot get the right ID value to set the legend text.

Any help?

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

Post by Pep » Mon Mar 22, 2004 6:39 pm

Hi Carlos,
I tried to set ID as the LABEL, but it mess the X axis scale. I can have more than one record with the same value for X and Y.
Setting the Bottom Axis labels to Value should do the trick :
dbchart1.Axes.Bottom.LabelStyle := talValue;
dbchart1.Legend.TextStyle := ltsPlain;

In that case if you have set the ID as a LABEL, the bottom axis will show the XValues and the Legend will show the point Label only.

Post Reply