Text: String;
The Text property determines a corridor name.
The corridor name is a text displayed with the corridor in internal and external legends.
The property is saved together with the chart.
Executing the example requires a regular report with the Rep_1 identifier with a chart on the report sheet. The inspector of unit assemblies must contain links 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(0, 2);
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 the 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: