IPPSpeedometerSector.Visible

Fore Syntax

Visible: Boolean;

Fore.NET Syntax

Visible: boolean;

Description

The Visible property determines whether sector is displayed.

Comments

Available values:

Fore Example

Executing the example requires that the repository contains a database with the ADHOC identifier. A dashboard must contain a speedometer with a sector on a data scale.

Add links to the Adhoc, Express, Metabase, Speedometer system assemblies.

Sub UserProc;
Var
    Speedometer: IPPSpeedometer;
    MB: IMetabase;
    AdhocReport: IAdhocReport;
    EaxSpeedometer: IEaxSpeedometer;
    Enalyzer: IEaxAnalyzer;
    DsObjs: IAdhocDataSourceObjects;
    Scales: IPPSpeedometerScales;
    Scale: IPPSpeedometerScale;
    Sectors: IPPSpeedometerSectors;
    Sector: IPPSpeedometerSector;
Begin
    MB := MetabaseClass.Active;
    // Get dashboard 
    AdhocReport := MB.ItemById("ADHOC").Edit As IAdhocReport;
    // Get dashboard data sources
    DsObjs := AdhocReport.DataSourceObjects;
    // Get speedometer
    Enalyzer := DsObjs.Item(0).GetSourceObject As IEaxAnalyzer;
    EaxSpeedometer := Enalyzer.Speedometer;
    // Get speedometer parameters
    Speedometer := EaxSpeedometer.Speedometer;
    // Get collection of speedometer scales
    Scales := Speedometer.Scales;
    // Get data scale
    Scale := Scales.DataScale;
    // Get scale sector
    Sectors := Scale.Sectors;
    Sector := Sectors.Item(0);
    // Hide sector
    Sector.Visible := False;
    (Enalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the sector is hidden.

Fore.NET Example

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.AdHoc;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Speedometer;

Public Shared Sub Main(Params: StartParams);
Var
    Speedometer: IPPSpeedometer;
    MB: IMetabase;
    AdhocReport: IAdhocReport;
    EaxSpeedometer: IEaxSpeedometer;
    Enalyzer: IEaxAnalyzer;
    DsObjs: IAdhocDataSourceObjects;
    Scales: IPPSpeedometerScales;
    Scale: PPSpeedometerScale;
    Sectors: IPPSpeedometerSectors;
    Sector: PPSpeedometerSector;
Begin
    MB := Params.Metabase;
    // Get dashboard 
    AdhocReport := MB.ItemById["ADHOC"].Edit() As IAdhocReport;
    // Get dashboard data sources
    DsObjs := AdhocReport.DataSourceObjects;
    // Get speedometer
    Enalyzer := DsObjs.Item[0].GetSourceObject() As IEaxAnalyzer;
    EaxSpeedometer := Enalyzer.Speedometer;
    // Get speedometer parameters
    Speedometer := EaxSpeedometer.Speedometer;
    // Get collection of speedometer scales
    Scales := Speedometer.Scales;
    // Get data scale
    Scale := Scales.DataScale;
    // Get scale sector
    Sectors := Scale.Sectors;
    Sector := Sectors.Item[0];
    // Hide sector
    Sector.Visible := False;
    (Enalyzer As IMetabaseObject).Save();
End Sub;

See also:

IPPSpeedometerSector

Related work items

Requirement