Corridors: IChartCorridors;
The Corridors property returns the chart corridors collection.
Executing the example requires a line chart on the regular report sheet with the REGULAR_REPORT identifier. The chart must contain more than two series. 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 stores 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: