IPPSpeedometerArrowBase.Background

Syntax

Background: IGxBrush;

Description

The Background property determines a brush for arrow background fill.

Comments

The Background property is relevant if the IPPSpeedometerArrowBase.EnableBrush property is set to True.

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, Drawing, Express, Metabase, Speedometer system assemblies.

Sub UserProc;
Var
    Speedometer: IPPSpeedometer;
    MB: IMetabase;
    AdhocReport: IAdhocReport;
    EaxSpeedometer: IEaxSpeedometer;
    Enalyzer: IEaxAnalyzer;
    DsObjs: IAdhocDataSourceObjects;
    Scales: IPPSpeedometerScales;
    Scale: IPPSpeedometerScale;
    Arrows: IPPSpeedometerArrows;
    Arrow: IPPSpeedometerArrowBase;
    SolidBrush: IGxSolidBrush;
    Color: IGxColor;
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 arrow
    Arrows := Scale.Arrows;
    Arrow := Arrows.Item(0);
    // Output arrow identifier and name
    Debug.WriteLine("Arrow identifier: " + Arrow.ID);
    // Output the value, to which arrow points at
    Debug.WriteLine("Value: " + Arrow.Value.ToString);
    // Output name of the scale, in which arrow is located
    Debug.WriteLine("Scale name: " + Arrow.Scale.Name);
    // Change arrow length
    Arrow.Radius := 0.9;
    // Change length of arrow tail
    Arrow.Tail := 0.2;
    // Change arrow width
    Arrow.Size := 3;
    // Change arrow shape
    Arrow.Type := PPSpeedometerArrowType.Triangle;
    // Set up arrow background fill
    Arrow.EnableBrush := True;
    Color := New GxColor.CreateRGB(0,128,0);
    SolidBrush := New GxSolidBrush.Create(Color);
    Arrow.Background := SolidBrush;
    // Set up arrow border color
    Color := New GxColor.CreateRGB(0,0,255);
    SolidBrush := New GxSolidBrush.Create(Color);
    Arrow.BorderBrush := SolidBrush;
    (Enalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example parameters of speedometer data scale arrow are set up.

See also:

IPPSpeedometerArrowBase