Back to Devexpress

DxChartAxisBase<T>.MinorTickCount Property

blazor-devexpress-dot-blazor-dot-dxchartaxisbase-1-fc242d26.md

latest2.9 KB
Original Source

DxChartAxisBase<T>.MinorTickCount Property

Specifies the number of minor ticks between two neighboring major ticks.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public int MinorTickCount { get; set; }

Property Value

TypeDescription
Int32

The number of minor ticks.

|

Remarks

The Chart axes initially do not display minor ticks. Set the Visible property to true to make them visible. The Chart calculates the number of minor ticks automatically. Specify the MinorTickCount property to define the number of minor ticks between two major ticks.

The following code snippet creates two minor ticks between neighboring major ticks on the value axis:

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" />
    <DxChartValueAxis MinorTickCount="2">
        <DxChartAxisMinorTick Visible="true" />
    </DxChartValueAxis>
</DxChart>

If you also specify the MinorTickInterval property, the desired minor tick number ( MinorTickCount ) might not fit the specified interval. In this case, the axis displays the number of ticks specified by the MinorTickInterval property.

The following example illustrates this behavior. Instead of 15 ticks, the value axis displays 4 ticks with the interval that equals 2:

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" />
    <DxChartValueAxis MinorTickCount="15" MinorTickInterval="2">
        <DxChartAxisMinorTick Visible="true" />
    </DxChartValueAxis>
</DxChart>

See Also

DxChartAxisBase<T> Class

DxChartAxisBase<T> Members

DevExpress.Blazor Namespace