BorderWidth: Double;
The BorderWidth property determines trend border width.
Executing the example requires that the repository contains a database with the ADHOC identifier. A dashboard must contain a speedometer with a trend on a data scale.
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;
Trends: IPPSpeedometerTrends;
Trend: IPPSpeedometerTrend;
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 trend
Trends := Scale.Trends;
Trend := Trends.Item(0);
// Set up trend border width
Trend.BorderWidth := 5;
// Set up trend border color
Color := New GxColor.CreateRGB(255,0,0);
SolidBrush := New GxSolidBrush.Create(Color);
Trend.BorderBrush := SolidBrush;
// Determine offset measurement unit - percents
Trend.IsAbsoluteLabelOffset := False;
// Set up trend text label offset
Trend.LabelOffset := 0.2;
(Enalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example trend text label border and offset are set up.
See also: