IPPTimeLine.DelayDuration

Fore Syntax

DelayDuration: Double;

Fore.NET Syntax

DelayDuration: double;

Description

The DelayDuration property determines animation delay time.

Comments

To determine animation step duration, use the IPPTimeLine.StepDuration property.

Fore 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;
    Timeline: IPPTimeLine;
    Arr: Array[3Of String;
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 speedometer timeline
    Timeline := Speedometer.TimeLine;
    // If timeline is hidden, display
    If Timeline.Visible = False Then
        Timeline.Visible := True;
    End If;
    Debug.WriteLine("Current step: " + Timeline.CurrentIndex.ToString);
    // Determine animation delay time
    Timeline.DelayDuration := 1.5;
    // Determine animation step duration
    Timeline.StepDuration := 2;
    // Timeline will cross speedometer
    Timeline.IsOverlap := True;
    // After finishing animation the current step of timeline is the last step
    Timeline.ReturnToInitialState := False
    // Align timeline to the right edge
    Timeline.HorizontalAlignment := PPSpeedometerHorizontalAlignment.Right;
    // Place timeline over speedometer
    Timeline.VerticalAlignment := PPSpeedometerVerticalAlignment.Top;
    // Determine names of timeline steps
    Arr[0] := "Step 1";
    Arr[1] := "Step 2";
    Arr[2] := "Step 3";
    Timeline.StepsNames := Arr;
    (Enalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example timeline parameters are set up.

Fore.NET Example

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.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;
    Timeline: IPPTimeLine;
    Arr: Array[3Of String;
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 speedometer timeline
    Timeline := Speedometer.TimeLine;
    // If timeline is hidden, display
    If Timeline.Visible = False Then
        Timeline.Visible := True;
    End If;
    System.Diagnostics.Debug.WriteLine("Current step: " + Timeline.CurrentIndex.ToString());
    // Determine animation delay time
    Timeline.DelayDuration := 1.5;
    // Determine animation step duration
    Timeline.StepDuration := 2;
    // Timeline will cross speedometer
    Timeline.IsOverlap := True;
    // After finishing animation the current step of timeline is the last step
    Timeline.ReturnToInitialState := False
    // Align timeline to the right edge
    Timeline.HorizontalAlignment := PPSpeedometerHorizontalAlignment.shaRight;
    // Place timeline over speedometer
    Timeline.VerticalAlignment := PPSpeedometerVerticalAlignment.svaTop;
    // Determine names of timeline steps
    Arr[0] := "Step 1";
    Arr[1] := "Step 2";
    Arr[2] := "Step 3";
    Timeline.StepsNames := Arr;
    (Enalyzer As IMetabaseObject).Save();
End Sub;

See also:

IPPTimeLine

Related work items

Requirement