TextIsMultiline: Boolean;
TextIsMultiline: System.Boolean;
The TextIsMultiline property determines whether the labels can be displayed in multiple lines.
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 throws an exception. Default value of this property is True.
This property is saved 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.
To execute this example, create 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;
// the Y axis labels are aligned to the right edge
ay.TextSpacing := 3.0;
ay.AutoTextSpacing := False;
// the minimum distance from the label to the axis line equals to 3 mm
ax := UiChart1.Chart.AxisX;
al := ax.TextAlignment;
// returns ChartAxisTextAlignment.Near
ax.TextAlignment := ChartAxisTextAlignment.Center;
// an exception is thrown for non-scatter chart types
ax.TextIsMultiline := False;
// text wrap is disabled
b := ay.TextIsMultiline;
// should always return False for all the axes except for the category axis
ay.TextIsMultiline := True;
// an exception
End Sub Button1OnClick;
To execute this example, create 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 Button1 disables text wrap and the X axis labels are arranged in one line.
See also: