blazor-devexpress-dot-blazor-dot-dxchartaxis-1-9f5ce680.md
Specifies the shift of an axis.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public int Offset { get; set; }
| Type | Description |
|---|---|
| Int32 |
The offset value in pixels.
|
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 shifts 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>
Run Demo: Chart Axes - Custom Position
See Also