Legend custom position

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Posts: 16
Joined: Tue Sep 18, 2018 12:00 am

Legend custom position

Post by johnnix » Fri Feb 01, 2019 1:31 pm


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?

Site Admin
Site Admin
Posts: 8591
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: Legend custom position

Post by Yeray » Mon Feb 11, 2019 9:48 am


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);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply