IChartAxisInterlineCaption.Text

Fore Syntax

Text: String;

Fore.NET Syntax

Text: string;

Description

The Text property determines a text of caption between level lines.

Comments

Header format is set up for the level line, from which interval fill is directed between level lines.

To determine a font of caption between level lines, use the IChartAxisInterlineCaption.Font property.

Fore Example

Executing the example requires a form containing the Button component with the Button1 identifier, the UiErAnalyzer component with the UiErAnalyzer1 identifier and the ChartBox component with the ChartBox1 identifier. Specify UiErAnalyzer1 as a data source for ChartBox1.

The example is a handler of the OnClick event for the Button1 component.

Add a link to the Drawing system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    AxisX, AxisY: IChartAxis;
    APen: IGxPen;
    ChartLevel: IChartAxisLevelLine;
    LevelLines : IChartAxisLevelLines;
    Caption: IChartAxisInterlineCaption;
Begin
    AxisX := ChartBox1.Chart.AxisX;
    // Add a level line:
    LevelLines := AxisX.LevelLines;
    LevelLines.Add(0.625000, APen);
    LevelLines.Add(0.875000, APen);
    // Fill interval between level lines:
    ChartLevel := LevelLines.Item(0);
    ChartLevel.InterlineColor := GxColor.FromName("Yellow");
    // Set up caption interval between level lines:
    ChartLevel.EnableInterlineCaption:=True;
    Caption := ChartLevel.InterlineCaption;
    Caption.Text:="Level = 2007";
    Caption.Font:= New GxFont.Create("Arial",10);
    Caption.FontColor:= GxColor.FromName("Blue");
    Caption.HorizontalAlignment:= ChartHorizontalAlignment.Left;
End Sub Button1OnClick;

After executing the example the chart displays level lines on the X axis according to the specified parameters:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Add links to the Chart and Drawing system assemblies.

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

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    AxisX, AxisY: IChartAxis;
    APen: GxPenClass;
    color: GxColorClass_2;
    ChartLevel: IChartAxisLevelLine;
    LevelLines : IChartAxisLevelLines;
    Caption: IChartAxisInterlineCaption;
    Font: GxFont = New GxFontClass();
    GxColor: GxColorClassClass = New GxColorClassClass();
Begin
    color := New GxColorClass_2();
    color.CreateRGB(000);
    APen := New GxPenClass();
    APen.CreateSolid(Color, 0.1);
    AxisX := ChartBoxNet1.CtrlBox.Chart.AxisX;
    // Add a level line:
    LevelLines := AxisX.LevelLines;
    LevelLines.Add(0.625000, APen);
    LevelLines.Add(0.875000, APen);
    // Fill interval between level lines:
    ChartLevel := LevelLines.Item(0);
    ChartLevel.InterlineColor := GxColor.FromName("Yellow");
    // Set up caption interval between level lines:
    ChartLevel.EnableInterlineCaption:=True;
    Caption := ChartLevel.InterlineCaption;
    Caption.Text:="Level = 2007";
    Caption.Font := Font;
    Font.Create("Arial",10, GxFontStyle.gfsRegular, GxUnit.guPoint);
    Caption.FontColor:= GxColor.FromName("Blue");
    Caption.HorizontalAlignment:= ChartHorizontalAlignment.chaLeft;
End Sub;

See also:

IChartAxisInterlineCaption