Skip to main content

DxChartAxis<T>.Offset Property

Specifies the shift of an axis.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public int Offset { get; set; }

Property Value

Type Description
Int32

The offset value in pixels.

Remarks

The Offset property defines the direction and distance of an axis shift. The shift direction depends on the Chart’s Rotated property value. The following table shows how axes map their Offset property values to shift directions if the Rotated property is not specified or set to false:

Axis Positive Offset Value Negative Offset Value
Argument Bottom Top
Value Left Right

If the Rotated property is set to true, the Chart swaps its axes:

Axis Positive Offset Value Negative Offset Value
Argument Left Right
Value Bottom Top

The following example shows how to shift the argument axis 95 pixels up:

<DxChart Data="@forecasts">
    <DxChartLineSeries ArgumentField="@((WeatherForecast i) => i.Date)"
                       ValueField="@((WeatherForecast i) => i.TemperatureC)"
                       Name="Temperature, C" />
    <DxChartLineSeries ArgumentField="@((WeatherForecast i) => i.Date)"
                       ValueField="@((WeatherForecast i) => i.TemperatureF)"
                       Name="Temperature, F" />
    <DxChartArgumentAxis Offset="-95" />
</DxChart>

DxChart - Argument Axis Offset (Shift)

Run Demo: Chart Axes - Custom Position

See Also