ChartAxisInterval.Year Property
In This Article
Returns an interval of one year.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
C#
public static ChartAxisInterval Year { get; }
#Property Value
Type | Description |
---|---|
Chart |
A Chart |
#Remarks
The Chart automatically calculates the interval between major and minor ticks based on the axis values. Use the TickInterval and MinorTickInterval properties to specify custom intervals.
The following example sets the tick interval to two years for major ticks and one year for minor ticks:
Razor
<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 TickInterval="ChartAxisInterval.Years(2)"
MinorTickInterval="ChartAxisInterval.Year">
<DxChartAxisMinorTick Visible="true" />
</DxChartArgumentAxis>
<DxChartLegend Visible="false" />
</DxChart>
See Also