Corridors: IChartCorridors;
The Corridors property returns a collection of chart corridors.
Executing the example requires a line chart on the regular report sheet with the REGULAR_REPORT identifier. There should be more than two series in a chart. Add links to the Report, Tab, Chart and Metabase system assemblies.
Sub UserProc;
Var
ActiveReport: IPrxReport;
Sheet: IPrxSheet;
PrxTable: IPrxTable;
TabSheet: ITabSheet;
C: IChart;
Corridor: IChartCorridors;
IdC: Integer;
MB: IMetabase;
Begin
MB:=MetabaseClass.Active;
ActiveReport:=MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Sheet:=ActiveReport.Sheets.Item(0);
PrxTable := Sheet As IPrxTable;
TabSheet := PrxTable.TabSheet;
C := TabSheet.Objects.Item(0).Extension As IChart;
Corridor := C.Corridors;
IdC := Corridor.Add(0, 2);
(ActiveReport As IMetabaseObject).Save;
End Sub UserProc;
A corridor is added between the first and the third series to the regular report chart. The IdC variable contains the index of the added corridor.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Chart;
Public Shared Sub Main(Params: StartParams);
Var
ActiveReport: IPrxReport;
Sheet: IPrxSheet;
PrxTable: IPrxTable;
TabSheet: ITabSheet;
C: IChart;
Corridor: IChartCorridors;
IdC: Integer;
MB: IMetabase;
Begin
MB := Params.Metabase;
ActiveReport := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
Sheet := ActiveReport.Sheets.Item[0];
PrxTable := Sheet As IPrxTable;
TabSheet := PrxTable.TabSheet;
C := TabSheet.Objects.Item[0].Extension As IChart;
Corridor := C.Corridors;
IdC := Corridor.Add[0, 2];
(ActiveReport As IMetabaseObject).Save();
End Sub;
See also: