Key: Integer;
The Key property returns a key of a scene series.
Executing the example requires a regular report with the REGULAR_REPORT identifier and a 3D scene in the report, and data in the cell range B1:E3. Set a random data source for the 3D scene. Add links to the Metabase, Report, Tab, Drawing system assemblies.
Sub UserProc;
Var
Report: IPrxReport;
Chart: IPrxScene3D;
Tab: ITabSheet;
MB: IMetabase;
Ser: IPrxScene3DSerie;
Begin
//Connect regular report
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Tab := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Chart := Tab.Objects.Item(0).Extension As IPrxScene3D;
Ser := Chart.Series.Item(0);
//Determine range of series values along the OX, OY, OZ axes
Ser.X := "B1:E1";
Ser.Y := "B2:E2";
Ser.Z := "B3:E3";
//Fill cells of series values along the OX, OY, OZ axes with set colors
Ser.XRange.Style.BackgroundColor := New GxColor.CreateRGB(255, 0, 0);
Ser.YRange.Style.BackgroundColor := New GxColor.CreateRGB(0, 255, 0);
Ser.ZRange.Style.BackgroundColor := New GxColor.CreateRGB(0, 0, 255);
//Display key and scene series type into set report cells
Tab.CellValue(1, 6) := Ser.Key;
Tab.CellValue(2, 6) := Ser.Type;
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the data source range is changed, the background of cells with values is filled with set colors, the key and the value of scene series type are displayed into the specified cells.
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.Drawing;
Public Shared Sub Main(Params: StartParams);
Var
Report: IPrxReport;
Chart: IPrxScene3D;
Tab: ITabSheet;
MB: IMetabase;
Ser: IPrxScene3DSerie;
Color: GxColorClass = New GxColorClassClass();
Begin
//Connect to regular report
MB := Params.Metabase;
Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
Tab := (Report.Sheets.Item[0] As IPrxTable).TabSheet;
Chart := Tab.Objects.Item[0].Extension As IPrxScene3D;
Ser := Chart.Series.Item[0];
//Determine range of series values along the OX, OY, OZ axes
Ser.X := "B1:E1";
Ser.Y := "B2:E2";
Ser.Z := "B3:E3";
//Series cell values along the OX, OY, OZ axes are filled with set colors
Ser.XRange.Style.BackgroundColor := Color.FromKnownColor(GxKnownColor.clRed);
Ser.YRange.Style.BackgroundColor := Color.FromKnownColor(GxKnownColor.clLightGreen);
Ser.ZRange.Style.BackgroundColor := Color.FromKnownColor(GxKnownColor.clBlue);
//Display key and scene series type into set report cells
Tab.CellValue[1, 6] := Ser.Key;
Tab.CellValue[2, 6] := Ser.Type;
(Report As IMetabaseObject).Save();
End Sub;
See also: