Page 1 of 1

Showing values in legends

Posted: Mon Feb 19, 2007 12:43 pm
by 9348284
Using the LegendStyle ls LastValues, I want to show the Values AND the Series title in the Legend of a number of TLineSeries.
I guess I have to use OnGetLegendText, as it is not the Point Labels but the Series Title I want to show.
My problem is that I cannot format the legend output nicely in a column-like setup - Different title lengths and values with different number of decimals makes it look like a mess.
The optimum would be something like this:
Image

Any suggestions?

Posted: Mon Feb 26, 2007 11:43 am
by Pep
Hi,

the only way that I can think of would be calculating the spaces that must be added before the extra text manually. There's a TextWidth(String) method under Chart.Canvas which can help to calculate the width of the Texts (values).