TChartLegend

TChartLegend
Hierarchy     Properties     Methods     

Unit
Chart

Description
TChartLegend is a big component with many available formatting and dimensioning properties.

A legend is a rectangle filled with the Chart Series Titles or a Series Values formatted representation.
You switch this operation mode by setting the
LegendStyle property.

The
Alignment property defines the Legend position.
Legend can be
placed at Top, Left, Right and Bottom side of Chart, or custom positioned using the CustomPosition property.

Left and Right Legend alignments define a vertical Legend with one single column of items.

Top and Bottom Legend alignments define an horizontal Legend with
one or more rows of items.

The Legend itself automatically reduces the number of displayed legend items based on the available charting space.

The ResizeChart property controls if Legend dimensions should be used to reduce Chart points space.

The OnGetLegendRect
event provides a mechanism to supply the desired Rectangle Legend dimensions and placement.

The OnGetLegendPos event can be used to specify fixed Legend items X Y coordinates.

The HorizMargin and VertMargin properties control distance between Legend and Left and Right
Chart margins.

The TopPos property can be used in Left or Right Legend alignments to control vertical distance between Legend and Top Chart Margin.

These techniques allow almost complete Legend control.