IChartExternLegend.ElementHorizontalAlignment

Syntax

ElementHorizontalAlignment: ChartLegendElementHorizontalAlignment;

Description

The ElementHorizontalAlignment property determines a type of horizontal alignment of the external legend elements.

Comments

By default, the left alignment is used (ChartLegendElementHorizontalAlignment. Left).

Example

Executing the example requires a regular report with a chart and an external legend on the report sheet. A unit is added to the report, and the UserProc procedure is called from this unit using the hyperlink. The inspector of unit assemblies must contain links to the Chart, Report, Tab system assemblies.

Sub UserProc;
 Var
    ChartExLegend: IChartExternLegend;
 Begin
    ChartExLegend := (PrxReport.ActiveReport.ActiveSheet As IPrxTable).TabSheet.Objects.Item(1As IChartExternLegend;
    ChartExLegend.IsMultiline := True;
    ChartExLegend.ElementHorizontalAlignment := ChartLegendElementHorizontalAlignment.Left;
 End Sub UserProc;

After executing the example the external legend elements are aligned to the left and the long names of elements are arranged in multiple lines.

See also:

IChartExternLegend