IPPSpeedometerScale.PassedLabelFontColor

Fore Syntax

PassedLabelFontColor: IGxColor;

Fore.NET Syntax

PassedLabelFontColor: Prognoz.Platform.Interop.Drawing.GxColor;

Description

The PassedLabelFontColor property determines a color of the text located in scale data labels passed by indicator.

Comments

To determine font parameters of the text located in scale data labels passed by indicator, use the IPPSpeedometerScale.PassedLabelFont property.

Fore 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;
    Font: IGxFont;
    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;
    // Set up font size of the text displayed in data labels passed by indicator
    Font := New GxFont.Create("Arial",9);
    Scale.PassedLabelFont := Font;
    // Set up color of the text displayed in data labels passed by indicator
    Color := New GxColor.CreateRGB(255,0,0);
    Scale.PassedLabelFontColor := Color;
    (Enalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, size and color is changed for the text located in scale data labels passed by indicator.

Fore.NET Example

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;
    Scales: IPPSpeedometerScales;
    Scale: PPSpeedometerScale;
    Color: GxColorClass;
    BrushColor: GxColor;
    Font: GxFont;
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;
    // Set up font size of the text displayed in data labels passed by indicator
    Font := New GxFontClass();
    Font.Create("Arial",9,GxFontStyle.gfsBold,GxUnit.guPoint);
    Scale.PassedLabelFont := Font;
    // Set up color of the text displayed in data labels passed by indicator
    Color := New GxColorClassClass();
    BrushColor := Color.FromKnownColor(GxKnownColor.clRed);
    Scale.PassedLabelFontColor := BrushColor;
    (Enalyzer As IMetabaseObject).Save();
End Sub;

See also:

IPPSpeedometerScale

Related work items

Requirement