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

Series.AxisGroup Property

Gets or sets the group type for the axes which are used to plot the series data.

Namespace: DevExpress.Spreadsheet.Charts

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


AxisGroup AxisGroup { get; set; }

Property Value

Type Description

An AxisGroup enumeration member specifying the axis group.


Use the AxisGroup to create secondary axes on the chart. When the AxisGroup is set to the AxisGroup.Secondary value, a group of secondary axes is created. Use the ChartObject.SecondaryAxes property to access these axes.

You cannot make all series on the chart secondary. An exception occurs when changing the AxisGroup value for the series which is the only primary series of a chart.

If you try to change the AxisGroup for a series whose type does not allow secondary axes, an exception occurs.

The example below demonstrates how to display a secondary axis on a chart. The secondary axis group is used to plot data of a specific series, for which the Series.AxisGroup property is set to AxisGroup.Secondary value.

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

' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.LineMarker, worksheet("B2:D8"))
chart.TopLeftCell = worksheet.Cells("F2")
chart.BottomRightCell = worksheet.Cells("L15")

' Use the secondary axis.
chart.Series(1).AxisGroup = AxisGroup.Secondary

' Specify the position of the legend.
chart.Legend.Position = LegendPosition.Top

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


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