MajorTick: IPPSpeedometerMarkerBase;
MajorTick: Prognoz.Platform.Interop.Speedometer.PPSpeedometerMarkerBase;
The MajorTick property determines parameters of rendering major scale tick marks.
To determine parameters of rendering minor scale tick marks, use the IPPSpeedometerScale.MinorTick 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;
Scales: IPPSpeedometerScales;
Scale: IPPSpeedometerScale;
Marker: IPPSpeedometerMarkerBase;
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;
// Resize major tick marks
Marker := Scale.MajorTick;
Marker.Size := 30;
// Resize minor tick marks
Marker := Scale.MinorTick;
Marker.Size := 15;
// Resize major tick marks passed by indicator
Marker := Scale.PassedMajorTick;
Marker.Size := 15;
// Resize minor tick marks passed by indicator
Marker := Scale.PassedMinorTick;
Marker.Size := 10;
// Hide labels
Scale.DisplayLabels := False;
(Enalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example major and minor scale tick marks are resized. Scale data labels are not displayed.
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;
…
Public Shared Sub Main(Params: StartParams);
Var
Speedometer: IPPSpeedometer;
MB: IMetabase;
AdhocReport: IAdhocReport;
EaxSpeedometer: IEaxSpeedometer;
Enalyzer: IEaxAnalyzer;
DsObjs: IAdhocDataSourceObjects;
Scales: IPPSpeedometerScales;
Scale: PPSpeedometerScale;
Marker: IPPSpeedometerMarkerBase;
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 collection of speedometer scales
Scales := Speedometer.Scales;
// Get data scale
Scale := Scales.DataScale;
// Resize major tick marks
Marker := Scale.MajorTick;
Marker.Size := 30;
// Resize minor tick marks
Marker := Scale.MinorTick;
Marker.Size := 15;
// Resize major tick marks passed by indicator
Marker := Scale.PassedMajorTick;
Marker.Size := 15;
// Resize minor tick marks passed by indicator
Marker := Scale.PassedMinorTick;
Marker.Size := 10;
// Hide labels
Scale.DisplayLabels := False;
(Enalyzer As IMetabaseObject).Save();
End Sub;
See also:
Related work items
Requirement