Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

Axis.MajorTickMarks Property

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

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll

Declaration

AxisTickMarks MajorTickMarks { get; set; }

Property Value

Type Description
AxisTickMarks

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

Remarks

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.

Example

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

The following code snippets (auto-collected from DevExpress Examples) contain references to the MajorTickMarks property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also