public GetLegendPosEventHandler GetLegendPos
Remarks
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
[C#]
private void tChart1_GetLegendRect(object sender, Steema.TeeChart.TChart.GetLegendRectEventArgs e)
{
//Move entire Legend frame rectangle to left
e.Rectangle=new Rectangle(e.Rectangle.Left-100,e.Rectangle.Top-20,e.Rectangle.Width,e.Rectangle.Height);
}
private void tChart1_GetLegendPos(object sender, Steema.TeeChart.TChart.GetLegendPosEventArgs e)
{
//move Legend contents
e.X=e.X-100;
e.XColor=e.XColor-100;
}
See Also
TChart Class | TChart Members | Steema.TeeChart Namespace