Changing legend position
Posted: Thu Jul 27, 2023 9:19 am
Hi,
I want to show the legend always at the TopLeft of the chart rect:
The chart is aligned to alClient of the main window, Legend.CustomPosition is set to true and Legend. PositionUnits is set to muPixels.
But where do I place the code to be executed after resizing the chart?
It seems to work best within OnBeforeDrawSeries, but not after maximising / restoring the window.
Can you please help?
I want to show the legend always at the TopLeft of the chart rect:
Code: Select all
Chart1.Legend.Left := Chart1.ChartRect.Left;
Chart1.Legend.Top := Chart1.ChartRect.Top;
But where do I place the code to be executed after resizing the chart?
It seems to work best within OnBeforeDrawSeries, but not after maximising / restoring the window.
Can you please help?