IChartCorridor.Text

Fore Syntax

Text: String;

Fore.NET Syntax

Text: System.String;

Description

The Text property determines the corridor name.  

Comments

The corridor name is a text displayed with the corridor in internal and external legends.  

The property is saved together with the chart.

Fore Example

To execute this example, create a regular report with the Rep_1 identifier with a chart on the report sheet. The inspector of module assemblies should contain references to the Chart, Report, Tab, Metabase and Drawing system assemblies.

Sub macro;
Var
    mb:Imetabase;
    report:iprxreport;
    chart:Ichart;
    corridors:IChartCorridors;
    corridor:IChartCorridor;
    index:integer;
Begin
    mb:= MetabaseClass.Active;
    report:= mb.ItemById("Rep_1").Edit As IPrxReport;
    chart:= (report.ActiveSheet As IPrxTable).TabSheet.Objects.Item(0).Extension As IChart;
    corridors:= chart.Corridors;
    index:=corridors.Add(02);
    corridor:= corridors.Item(index);
    corridor.Color:= GxColor.FromKnownColor(GxKnownColor.Coral);
    corridor.Text:= "Corridor between the first and the third series";
    corridor.DisplayInLegend:= True;
    (report As IMetabaseObject).Save;
End Sub macro;

Executing this example adds a corridor between the first and the third series to the report chart and enables displaying the corridor in the legend with the name specified in the Text property.

Fore.NET Example

To execute this example, create a regular report with the Rep_1 identifier with a chart on the report sheet. The inspector of module assemblies should contain references to the Chart, Report, Tab and Drawing system assemblies.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Drawing;

...

Public Shared Sub Macro(Params: StartParams);
Var
    mb: IMetabase;
    report: IPrxReport;
    chart: IChart;
    corridors: IChartCorridors;
    corridor: IChartCorridor;
    index: integer;
    color: GxColorClass_2;
Begin
    mb := Params.Metabase;
    report := mb.ItemById["Rep_1"].Edit() As IPrxReport;
    chart := (report.ActiveSheet As IPrxTable).TabSheet.Objects.Item[0].Extension As IChart;
    corridors := chart.Corridors;
    index := corridors.Add[02];
    corridor:= corridors.Item[index];
    color := New GxColorClass_2();
    color.CreateRGB(2550255);
    corridor.Color := color;
    corridor.Text := "Corridor between the first and the third series";
    corridor.DisplayInLegend := True;
    (report As IMetabaseObject).Save();
End Sub;

Executing this example adds a corridor between the first and the third series to the report chart and enables displaying the corridor in the legend with the name specified in the Text property.

See also:

IChartCorridor