Code: Select all
GetLegendRectEvent(TCustomChart *Sender, TRect &Rect)
{
int ExtraLegendWidth=floor((double)(Rect.Right-Rect.Left)*0.5+0.5);
if (ExtraLegendWidth<35) ExtraLegendWidth=35;
Rect.Left-=ExtraLegendWidth;
}
Then drew the lines in the legend to the left of the symbols, text using the
ChartAfterDrawEvent
Now I am using Teechart Pro 2023 and using the same code, the legend places the symbols as left aligned and the text as right aligned, so that the lines are now drawn through the symbols.
I have tried setting TextSymbolGap
in the GetLegendRectEvent
, but this does not seem to help.How to I get the symbols to lie just before the right aligned text, as before, when I add extra space to the legend on the left?