Page 1 of 1

CustomLegend problem!

Posted: Fri Mar 19, 2004 6:09 pm
by 9231501
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?

Posted: Mon Mar 22, 2004 6:39 pm
by Pep
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.