IPPSpeedometerTimeDataAdapter.Data

Syntax

Data(Attribute: Variant; TimePointIndex: Integer): Variant;

Parameters

Attribute. Attribute.

TimePointIndex. Time point.

Description

The Data property returns attribute value to the specified time point.

Example

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

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;
    Data: IPPSpeedometerTimeDataAdapter;
    i: integer;
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 attribute data
    Data := Scale.DataSource;
    For i := 0 To Data.TimePointsCount - 1 Do
        Debug.WriteLine("Time point: " + Data.TimePointName(i) + 
            ", attribute value: " + Data.Data("Gross regional product per capita, roubles.", i));
    End For;
    (Enalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the console window displays name and attribute value for each time point.

See also:

IPPSpeedometerTimeDataAdapter