.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Axis.MajorTickMarks Property

Gets or sets the position of major tick marks on the axis.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll


AxisTickMarks MajorTickMarks { get; set; }
Property MajorTickMarks As AxisTickMarks

Property Value

Type Description

An AxisTickMarks enumeration value that specifies how major tick marks are displayed on the axis.


Tick marks are tiny lines that are used to indicate the demarcation of the axis. Use the MajorTickMarks property to specify how major tick marks appear: whether they are displayed inside or outside the plot area, whether they cross the axis, or if they are completely hidden.

You can also use the Axis.MinorTickMarks property to add minor tick marks to the axis.


The example below demonstrates how to create the clustered column chart and hide the axis major tick marks by setting the Axis.MajorTickMarks property to the AxisTickMarks.None value.

Dim worksheet As Worksheet = workbook.Worksheets("chartTask3")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet("B3:C5"))
chart.TopLeftCell = worksheet.Cells("H2")
chart.BottomRightCell = worksheet.Cells("N14")

' Set the axis tick marks.
Dim axis As Axis = chart.PrimaryAxes(0)
axis.MajorTickMarks = AxisTickMarks.None
axis = chart.PrimaryAxes(1)
axis.MajorTickMarks = AxisTickMarks.None

' Hide the legend.
chart.Legend.Visible = False
See Also