DelayDuration: Double;
The DelayDuration property determines animation delay time.
To determine animation step duration, use the IPPTimeLine.StepDuration property.
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[3] Of 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.
See also: