IChartLabel.Position

Fore Syntax

Position: ChartLabelPosition;

Fore.NET Syntax

Position: Prognoz.Platform.Interop.Chart.ChartLabelPosition;

Description

The Position property determines data label position relative to a series (column, sector. line and so on).

Comments

The ChartLabelPosition enumeration contains positions depending on the series type: there is a set of options for columns and sectors, and another set of options for lines, areas and points.

When placing column labels "At the peak inside" or "At the peak outside" a 1 mm distance is left between column top and the label. When placing column labels "At the base inside", a 1 mm distance is left between the column base and the label.

Fore Example

Executing the example requires a regular report with the bar chart on its sheet. A unit is added to the report, and you can use a hyperlink to call the GetChart procedure from this unit. The inspector of unit assemblies should contain links to the following system assemblies: Chart, Report, Tab.

Sub GetChart;
Var
    chart: IChart;
    objs: ITabObjects;
Begin
    objs := (PrxReport.ActiveReport.ActiveSheet As IPrxTable).TabSheet.Objects;
    chart := objs.Item(0).Extension As IChart;
    chart.Series.DisplayLabels := True;
    chart.Series.DefaultLabel.Position := ChartLabelPosition.BaseInside;
End Sub GetChart;

Clicking the hyperlink shows all data labels positioned at the columns' base.

Fore.NET Example

Executing the example requires a regular report with the bar chart on its sheet. A .NET assembly is added to the report to handle report events. The EventsClass class in the unit of the specified assembly contains description of the OnBeforeOpenReport event.

Public Override Sub OnBeforeOpenReport(Report: IPrxReport; Out Cancel: Boolean);
Var
    chart: IChart;
    objs: ITabObjects;
Begin
    Cancel := False;
    objs := Report.ActiveSheet.Table.Objects;
    chart := objs.Item[0].Extension As IChart;
    chart.Series.DisplayLabels := True;
    chart.Series.DefaultLabel.Position := ChartLabelPosition.clpBaseInside;
End Sub OnBeforeOpenReport;

After the report is opened, all data labels positioned at the columns' base are displayed for series.

See also:

IChartLabel