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

DxChartAxisMinorTick.Shift Property

Shifts minor ticks relative to an axis line.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(3)]
[Parameter]
public int Shift { get; set; }

#Property Value

Type Default Description
Int32 3

The shift value in pixels.

#Remarks

Use the Shift property to move the center of minor ticks relative to an axis line:

  • The positive shift value moves minor ticks towards axis labels. In the following image, the shift value is 3 (default value):

    Major Ticks Positive Shift

  • If the shift value is 0, the minor ticks are in the reference position. The axis crosses the center of each minor tick:

    Major Ticks Reference Position

  • The negative shift value moves minor ticks away from the axis labels. In the image below, the shift value is -3:

    Major Ticks Negative Shift

The following example shifts minor ticks on the value axis and set their length to 10 pixels:

Razor
<DxChart Data="@forecasts">
    <DxChartLineSeries ArgumentField="@((WeatherForecast i) => i.Date)"
                       ValueField="@((WeatherForecast i) => i.TemperatureF)"
                       Name="Temperature, F" />
    <DxChartValueAxis>
        <DxChartAxisMinorTick Visible="true"
                              Shift="6"
                              Length="10" />
    </DxChartValueAxis>
</DxChart>

Minor tick changed length and shifted

See Also