Background: IGxBrush;
The Background property determines the brush that is used to fill speedometer area background.
The Background property is relevant if the IPPSpeedometer.EnableBrush property is set to True.
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;
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;
// Set up fill speedometer background area
Speedometer.EnableBrush := True;
Color := New GxColor.CreateRGB(0,128,0);
SolidBrush := New GxSolidBrush.Create(Color);
Speedometer.Background := SolidBrush;
(Enalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the fill of speedometer background area is added.
See also: