IChartAxis.TextIsMultiline

Fore Syntax

TextIsMultiline: Boolean;

Fore.NET Syntax

TextIsMultiline: System.Boolean;

Description

The TextIsMultiline property determines whether labels can be displayed in multiple lines.

Comments

The property is outdated, use IChartAxis.TextMultiline.

The TextIsMultiline property can be set only for the X axis for non-scatter chart types. Any attempts to set this property for another axis throw an exception. The property is set to True by default.

This property is saved together with the chart. If an object from the previous version is loaded, the TextAlignment, AutoTextSpacing, TextSpacing, TextVisible, and TextIsMultiline properties for the object are set to their default values.

Fore Example

Executing the example requires a form with a button named Button1 on the form, the ChartBox component and the UiChart component that is a data source.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ay, ax: IChartAxis;
    al: ChartAxisTextAlignment;
    b: Boolean;
Begin
    ay := UiChart1.Chart.AxisY;
    ay.TextAlignment := ChartAxisTextAlignment.Near;
    // Y axis labels are aligned to the right edge
    ay.TextSpacing := 3.0;
    ay.AutoTextSpacing := False;
    // minimum distance from label to axis line is 3 mm
    ax := UiChart1.Chart.AxisX;
    al := ax.TextAlignment;
    // returns ChartAxisTextAlignment.Near
    ax.TextAlignment := ChartAxisTextAlignment.Center;
    // exception is thrown for non-scatter chart types
    ax.TextIsMultiline := False;
    // text wrap is disabled
    b := ay.TextIsMultiline;
    // must always return False for all axes except for category axis
    ay.TextIsMultiline := True;
    // exception
End Sub Button1OnClick;

Fore.NET Example

Executing the example requires a form with a button named Button1 on the form, the ChartBoxNet component and the UiChartNet component that is a data source.

...

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;

Private Sub button1_Click( sender: System.Object; e: System.EventArgs );
Var
    ay: IChartAxis;
    ax: IChartAxis;
Begin
    ay:= UiChartNet1.ChartUi.Chart.AxisY;
    ax:= UiChartNet1.ChartUi.Chart.AxisX;        
    ay.TextSpacing:=  3.0;   
    ay.AutoTextSpacing:=  False;   
    ax.TextIsMultiline:=  False;
End Sub;

Clicking the Button1 button disables text wrap and the X axis labels are arranged in one line.

See also:

IChartAxis