blazor-devexpress-dot-blazor-dot-dxchartaxis-1-bd258c80.md
Specifies the position of an axis on another axis.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public object CustomPosition { get; set; }
| Type | Description |
|---|---|
| Object |
The value (date, number, or string) on another axis where axes intersect.
|
Specify the CustomPosition property value in the same format as the values on another axis. If you also specify the Offset property, the Chart shifts the intersection point relative to the CustomPosition property value. If the CustomPosition property value is outside the axis range, the Chart ignores the Offset property value and moves the intersection point to a pane edge. The CustomPosition property overrides the Alignment property.
The following example applies the CustomPosition property to the argument axis:
<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 CustomPosition="45" />
</DxChart>
namespace Chart.Data {
using System;
public class WeatherForecast {
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public double TemperatureF => Math.Round((TemperatureC * 1.8 + 32), 2);
public double Precipitation { get; set; }
}
}
If your Chart contains multiple value axes, specify the CustomPositionAxisName property to define the value axis that the argument axis intersects at the CustomPosition value.
Run Demo: Chart Axes - Custom Position
See Also