IChartLabel.Text

Fore Syntax

Text: String;

Fore.NET Syntax

Text: string;

Description

The Text property returns the text of data label on the chart.

Fore Example

To execute this example, create a regular report with a chart on the report sheet. A unit is to be added to the report and the UserProc procedure is called from this unit using the hyperlink. The inspector of unit assemblies should contain links to the Chart, Report and Tab system assemblies.

Sub UserProc;
Var
    Chart: IChart;
Begin
    Chart := (PrxReport.ActiveReport.ActiveSheet As IPrxTable).TabSheet.Objects.Item(1).Extension As IChart;
    WinApplication.InformationBox(Chart.Series.Item(0).Label(0).Text);
End Sub UserProc;

After executing the example, clicking the hyperlink displays the message that contains the text of the first label of the first data series on the chart.

Fore.NET Example

To execute this example, create a regular report with a chart and an external legend on the report sheet. The .NET assembly is added to the report to handle report events. The OnBeforeOpenReport event is described in the unit of the specified assembly in the EventsClass class. The inspector of unit assemblies should contain links to the Chart, Report and Tab system assemblies.

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Chart;
Imports System.Windows.Forms;

...

Public Override Sub OnBeforeOpenReport(Report : IPrxReport; Var Cancel : Boolean);
Var
    Chart: IChart;
Begin
    Chart := (Report.ActiveSheet As IPrxTable).TabSheet.Objects.Item[1].Extension As IChart;
    MessageBox.Show(Chart.Series.Item[0].Label[0].Text);
End Sub OnBeforeOpenReport;

Opening the report displays the message that contains the text of the first label of the first data series on the chart.

See also:

IChartLabel