IBubbleChartPlacedItem.Font

Fore Syntax

Font: IGxFont;

Fore.NET Syntax

Font: Prognoz.Platform.Interop.Drawing.GxFont;

Description

The Font property determines a text font.

Comments

To determine a font color, use the IBubbleChartPlacedItem.FontColor property.

Fore Example

Executing the example requires an express report with the Express_Font identifier. The express report is set up to ensure bubble chart displaying and operation.

Add links to the Metabase, Cubes, Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Eax: IEaxAnalyzer;
    Bubble: IBubbleChart;
    BubbleCaption: IBubbleChartPlacedItem;
    BubbleCaptionText: IBubbleChartCaption;
Begin
    MB := MetabaseClass.Active;
    Eax := MB.ItemById("Express_Font").Edit As IEaxAnalyzer;
    Bubble := Eax.BubbleChart.Chart;
    // bubble chart caption parameters;
    BubbleCaption := Bubble.Caption;
    // display text:
    BubbleCaption.Visible := True;
    // text font:
    BubbleCaption.Font := New GxFont.Create("Arial"14);
    // font color:
    BubbleCaption.FontColor := GxColor.FromName("Red");
    // text direction:
    BubbleCaption.TextDirection := BubbleChartTextDirection.BottomToTop;
    // vertical alignment of text:
    BubbleCaption.VerticalAlignment := ChartVerticalAlignment.Middle;
    // horizontal alignment of text:
    BubbleCaption.HorizontalAlignment := ChartHorizontalAlignment.Right;
    // value of padding from text to bubble chart component border:
    BubbleCaption.Padding := 20;
    // values of margins:
    BubbleCaption.Margin := New GxRectF.Create(00020);
    // text wrap:
    BubbleCaption.WordWrap := True;
    // caption text:
    BubbleCaptionText := Bubble.Caption;
    BubbleCaptionText.Text := "Dynamics of change";
    (Eax As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the following parameters are determined for the bubble chart caption:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Drawing;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Eax: IEaxAnalyzer;
    Bubble: IBubbleChart;
    BubbleCaption: IBubbleChartCaption;
    BubbleCaptionText: IBubbleChartCaption;
    CaptionFont: GxFont = New GxFontClass();
    MarginRect: GxRectF = New GxRectFClass();
    GxColorCls: GxColorClass = New GxColorClassClass();
Begin
    MB := Params.Metabase;
    Eax := MB.ItemById["Express_Font"].Edit() As IEaxAnalyzer;
    Bubble := Eax.BubbleChart.Chart;
    // bubble chart caption parameters;
    BubbleCaption := Bubble.Caption;
    // display text:
    BubbleCaption.Visible := True;
    // text font:
    BubbleCaption.Font := CaptionFont;
    CaptionFont.Create("Arial"12, GxFontStyle.gfsRegular, GxUnit.guPoint);
    // font color:
    BubbleCaption.FontColor := GxColorCls.FromName("Green");
    // text direction:
    BubbleCaption.TextDirection := BubbleChartTextDirection.bctdBottomToTop;
    // vertical alignment of text:
    BubbleCaption.VerticalAlignment := ChartVerticalAlignment.cvaMiddle;
    // horizontal alignment of text:
    BubbleCaption.HorizontalAlignment := ChartHorizontalAlignment.chaRight;
    // value of padding from text to bubble chart component border:
    BubbleCaption.Padding := 20;
    // values of margins:
    BubbleCaption.Margin := MarginRect;
    MarginRect.Create(00020);
    // text wrap:
    BubbleCaption.WordWrap := True;
    // caption text:
    BubbleCaptionText := Bubble.Caption;
    BubbleCaptionText.Text := "Dynamics of change";
    (Eax As IMetabaseObject).Save();
End Sub;

See also:

IBubbleChartPlacedItem