IChartAxisInterlineCaption.Text

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.

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:

See also:

IChartAxisInterlineCaption