Skip to main content

Axis Tickmarks

Tickmarks divide an axis into equal sections. There are two types of tickmarks: major and minor.

Tickmarks

The table below lists tickmark customization options.

Property

Description

AxisBase.ShowMajorTickmarks

Specifies whether the major tickmarks are visible.

AxisBase.ShowMinorTickmarks

Specifies whether the minor tickmarks are visible.

AxisBase.TickmarksCrossAxis

Specifies whether tickmarks cross the axis.

AxisBase.TickmarksLength

Specifies the major tickmark length (in pixels).

AxisBase.TickmarksMinorLength

Specifies the minor tickmark length (in pixels).

AxisBase.TickmarksThickness

Specifies the major tickmark thickness (in pixels).

AxisBase.TickmarksMinorThickness

Specifies the minor tickmark thickness (in pixels).

The following example shows major and minor tickmarks for X and Y-axes:

<Charts:CartesianChart x:Name="chart">
    <Charts:CartesianChart.AxisX>
        <Charts:AxisX x:Name="axisX" ShowLine="True" 
                                     ShowMajorTickmarks="True" 
                                     ShowMinorTickmarks="True" 
                                     TickmarksLength="7" 
                                     TickmarksMinorLength="3"/>
    </Charts:CartesianChart.AxisX>
    <Charts:CartesianChart.AxisY>
        <Charts:AxisY x:Name="axisY" ShowLine="True"
                                     ShowMajorTickmarks="True" 
                                     ShowMinorTickmarks="True" 
                                     TickmarksLength="7" 
                                     TickmarksMinorLength="3"/>
    </Charts:CartesianChart.AxisY>
    <!--...-->
</Charts:CartesianChart>