Item

ChartSeriesGroupCollection indexer

Returns a ChartSeriesGroup at the specified index.

public ChartSeriesGroup this[int index] { get; }

Examples

Show how to remove secondary axis.

Document doc = new Document(MyDir + "Combo chart.docx");

Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
Chart chart = shape.Chart;
ChartSeriesGroupCollection seriesGroups = chart.SeriesGroups;

// Find secondary axis and remove from the collection.
for (int i = 0; i < seriesGroups.Count; i++)
    if (seriesGroups[i].AxisGroup == AxisGroup.Secondary)
        seriesGroups.RemoveAt(i);

See Also