ITChart.OnGetLegendPos
ITChart
property OnGetLegendPos: TTChartOnGetLegendPos;
Type Library
TeeChartx
Description
An OnGetLegendPos event occurs whenever a Legend item is going to be displayed.
You can used this event to force specific X , Y and / or XColor Legend pixel coordinates.
The Chart class calculates the default X,Y and XColor parameters before calling this event.
The Sender parameter is the TChart class that originated the event.
The Index parameter corresponds to the specific Legend item number going to be displayed. It can be either an Active Series Title or a Series point index, depending on the Legend.LegendStyle property.
Example [Visual Basic]:
Private Sub TChart1_OnGetLegendPos(ByVal ItemIndex As Long, X As Long, Y As Long, XColor As Long)
'Move Legend contents
X = X - 10
Y = Y + 5
XColor = XColor - 10
End Sub