Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxChartAxisBase<T>.EndOnTick Property

Specifies whether an axis should start and end on ticks.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(null)]
[Parameter]
public bool? EndOnTick { get; set; }

#Property Value

Type Default Description
Nullable<Boolean> null

true to start and end the axis on ticks; otherwise, false.

#Remarks

If the EndOnTick property is set to true, the Chart component extends its axes so that they start and end on ticks.

Razor
<DxChart Data="@forecasts">
    <DxChartArgumentAxis EndOnTick="true"></DxChartArgumentAxis>
    <DxChartValueAxis EndOnTick="true"></DxChartValueAxis>
    @* ... *@
</DxChart>

Charts - Axis - End of Tick - True

To change the default behavior, set the EndOnTick property to false. In this case, the Chart starts and ends at the outermost points with additional margins.

Razor
<DxChart Data="@forecasts">
    <DxChartLineSeries ArgumentField="@((WeatherForecast i) => i.Date)"
                       ValueField="@((WeatherForecast i) => i.Precipitation)"
                       Name="Precipitation">
    </DxChartLineSeries>
    <DxChartArgumentAxis EndOnTick="false" SideMarginsEnabled="true"></DxChartArgumentAxis>
    <DxChartValueAxis EndOnTick="false" SideMarginsEnabled="true"></DxChartValueAxis>

</DxChart>

Charts - Axis - End of Tick - False

To remove these margins, set SideMarginsEnabled property to false.

Razor
<DxChart Data="@forecasts">
    @* No spaces between the line and the axes *@
    <DxChartArgumentAxis SideMarginsEnabled="false" EndOnTick="false"></DxChartArgumentAxis>
    <DxChartValueAxis Name="Temperature" SideMarginsEnabled="false" EndOnTick="false"></DxChartValueAxis>
    @* ... *@
</DxChart>

Charts - Axis - End of Tick - No Margins

See Also