Page 1 of 1

Legend custom position

Posted: Fri Feb 01, 2019 1:31 pm
by 16584466

I have an issue with placing the legend in a custom position, I have some code set inside the OnGetLegendRect to set the Rect position but I need to get an axis IAxisSize (I have a custom bottom axis). Once my application loads data to the plot the legend appears a little off position but once I move the mouse over the plot the legend jumps back to the correct position. Is there a way to make the chart recalculate the values IStartPos, IStartEnd etc?

Re: Legend custom position

Posted: Mon Feb 11, 2019 9:48 am
by yeray

You probably need to force a chart repaint so some internal properties are calculated the second time the OnGetLegendRect event is fired.

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);