Skip to main content

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

DxChartAxis<T>.SideMarginsEnabled Property

Specifies whether the component should add margins between the outermost series points and the chart boundaries.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(true)]
[Parameter]
public bool SideMarginsEnabled { get; set; }

#Property Value

Type Default Description
Boolean true

true to add a margin between the outermost series points and the chart boundaries; otherwise, false.

#Remarks

The Chart adds margins between the outermost series points and the component’s boundaries. Minimum and maximum series points appear inside the chart area.

Charts - Side Margin Default

To change the default behavior and remove the margins, set the SideMarginsEnabled property to false. Maximum and minimum series points fall onto the axis lines.

Razor
<DxChart Data="@forecasts">
    <DxChartArgumentAxis SideMarginsEnabled="false"></DxChartArgumentAxis>
    <DxChartValueAxis SideMarginsEnabled="false"></DxChartValueAxis>
    @* ... *@
</DxChart>

Charts - Side Margin False

You can also use the EndOnTick property to extend Chart’s axes so that they start and end on ticks.

See Also