BorderWidth: Double;
BorderWidth: double;
The BorderWidth property determines marker border width.
The BorderWidth property is relevant if the IPPSpeedometerMarkerBase.EnableBorder 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;
Center: IPPSpeedometerMarkerBase;
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 speedometer marker parameters
Center := Speedometer.Center;
// Set up marker border
Center.EnableBorder := True;
Color := New GxColor.CreateRGB(255,255,0);
SolidBrush := New GxSolidBrush.Create(Color);
Center.BorderBrush := SolidBrush;
// Set up marker border width
Center.BorderWidth := 10;
// Set up style marker border rendering
Center.BorderStyle := GxDashStyle.Dash;
// Set up marker offset
Center.Offset := 0.1;
// Set up marker size
Center.Size := 20;
// Set up marker tooltip
Center.ToolTip := "Center";
// Set up marker background fill
Center.EnableBrush := True;
Color := New GxColor.CreateRGB(0,255,0);
SolidBrush := New GxSolidBrush.Create(Color);
Center.Background := SolidBrush;
// Set up marker shape
Center.MarkerType := PPSpeedometerMarkerType.Circle;
// Set up marker label position
Center.LabelPlacementStyle := PPLabelPlacementStyle.Center;
(Enalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example speedometer marker parameters are set up.
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;
Imports Prognoz.Platform.Interop.Drawing;
…
Public Shared Sub Main(Params: StartParams);
Var
Speedometer: IPPSpeedometer;
MB: IMetabase;
AdhocReport: IAdhocReport;
EaxSpeedometer: IEaxSpeedometer;
Enalyzer: IEaxAnalyzer;
DsObjs: IAdhocDataSourceObjects;
Center: IPPSpeedometerMarkerBase;
SolidBrush: IGxSolidBrush;
Color: GxColorClass;
BorderColor: GxColor;
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 marker parameters
Center := Speedometer.Center;
// Set up marker border
Center.EnableBorder := True;
Color := New GxColorClassClass();
BorderColor := Color.FromKnownColor(GxKnownColor.clYellow);
SolidBrush := New GxSolidBrushClass();
SolidBrush.Color := BorderColor;
Center.BorderBrush := SolidBrush;
// Set up marker border width
Center.BorderWidth := 10;
// Set up style marker border rendering
Center.BorderStyle := GxDashStyle.gdsDash;
// Set up marker offset
Center.Offset := 1;
// Set up marker size
Center.Size := 20;
// Set up marker tooltip
Center.ToolTip := "Center";
// Set up marker background fill
Center.EnableBrush := True;
BorderColor := Color.FromKnownColor(GxKnownColor.clGreen);
SolidBrush.Color := BorderColor;
Center.Background := SolidBrush;
// Set up marker shape
Center.MarkerType := PPSpeedometerMarkerType.mtCircle;
// Set up marker label position
Center.LabelPlacementStyle := PPLabelPlacementStyle.lpsCenter;
(Enalyzer As IMetabaseObject).Save();
End Sub;
See also: