PositionOffset: ChartAxisPositionOffsetType;
The PositionOffset property determines a type of axis offset relative to chart plot area.
Axis offset is disabled by default.
If the offset is used, its value is determined in the IChartAxis.PositionOffsetValue property.
On the specified positive value the axis is offset opposite from the plot area. On the negative value it is offset inside the plot area.
The example includes an event handler. To execute the example, add links to the MathFin and Chart system assemblies. Add the UiChart component with the UiChart1 identifier, the Button button and ChartBox with the UiChart1 data source to the form to display example result.
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 Axis: IChartAxis;
Begin
Axis := UiChart1.Chart.AxisX;
Axis.PositionOffset := ChartAxisPositionOffsetType.Custom;
Axis.PositionOffsetValue := 10;
End Sub Button1OnClick;
After executing the example the X axis is offset 10 mm left relative to the chart plot area.
See also: