AllowOverlapLabels: Boolean;
AllowOverlapLabels: Boolean;
The AllowOverlapLabels property determines whether chart labels can overlap.
The property is outdated, use IChart.TickLabelSpacingAuto.
By default the property is set to False, and labels are not overlapped.
If the property is set to True and:
If IChartAxis.TextIsMultiline is set to True, labels are overlapped only in case if the text of the label cannot be carried forward.
If IChartAxis.TextIsMultiline is set to False, instead of cutting with dots the labels are overlapped.
In the interface the property is set by the Allow Overlap Labels checkbox on the View tab of the Axis Format dialog box.
To execute this example, add a reference to the MathFin system assembly . Place the Button, UiChart and ChartBox components on the form. Specify UiChart as the source of ChartBox. Specify points and series number for UiChart.
Class TestForm: Form
Button1: Button;
ChartBox1: ChartBox;
UiChart1: UiChart;
Sub UiChart1OnGetDataValue(Sender: Object; Args: IUiChartGetDataValueEventArgs);
Begin
Args.Result := True;
Args.Value := Math.RandBetween(10,40);
End Sub UiChart1OnGetDataValue;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
chart: IChart;
Begin
chart := UiChart1.Chart;
chart.AxisX.AllowOverlapLabels := True;
End Sub Button1OnClick;
End Class TestForm;
Click the button on the form. After executing the example captions of X axis are overlapped.
To execute an example add reference to the Chart system assembly. Place the Button, uiChartNet and chartBoxNet components on the form. Specify uiChartNet as the source of chartBoxNet.
Imports Prognoz.Platform.Interop.Chart;
...
Private Sub OBJ1656Form_Shown(sender: System.Object; e: System.EventArgs);
Begin
uiChartNet1.PointCount := 5;
uiChartNet1.SerieCount := 2;
End Sub;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
chart: DxChart;
Begin
chart := uiChartNet1.ChartUi.Chart;
chart.AxisX.AllowOverlapLabels := True;
End Sub;
End Class;
Click the button on the form. After executing the example captions of X axis are overlapped.
See also: