IChartAxis.PositionOffset

Fore Syntax

PositionOffset: ChartAxisPositionOffsetType;

Fore.NET Syntax

PositionOffset: Prognoz.Platform.Interop.Chart.ChartAxisPositionOffsetType;

Description

The PositionOffset property determines a type of axis offset relative to chart plot area.

Comments

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.

Fore Example

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.

Fore.NET Example

The example includes an event handler. To execute the example, add links to the MathFin and Chart system assemblies. Add the uiChartNet component with the uiChartNet1 identifier, the button component and the ChartBoxNet component to the form.

Imports Prognoz.Platform.Interop.MathFin;
Imports Prognoz.Platform.Interop.Chart;

...

Private Sub uiChartNet1_OnGetDataValue(Sender: System.Object; Args: Prognoz.Platform.Interop.Chart.UiChartGetDataValueEventArgs);
Var Math: Prognoz.Platform.Interop.MathFin.Math = New MathClass();
Begin
    Args.Result := True;
    Args.Value := Math.RandBetween(10,60);
End Sub;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var Axis: IChartAxis; 
Begin
    Axis := uiChartNet1.ChartUi.Chart.AxisX;
    Axis.PositionOffset := ChartAxisPositionOffsetType.capoCustom;
    Axis.PositionOffsetValue := 10;
End Sub;

After executing the example the X axis is offset 10 mm left relative to the chart plot area.

See also:

IChartAxis