Skip to main content

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.v23.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

AxisGroup AxisGroup { get; set; }

Property Value

Type Description
AxisGroup

An AxisGroup enumeration member specifying the axis group.

Available values:

Name Description
Primary

Specifies the group of primary axes.

Secondary

Specifies the group of secondary axes.

Remarks

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.

View Example

Worksheet worksheet = workbook.Worksheets["chartTask5"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Create a chart and specify its location.
Chart 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.

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