ChartSeriesGroup

ChartSeriesGroup class

Represents properties of a chart series group, that is, the properties of chart series of the same type associated with the same axes.

public class ChartSeriesGroup

Properties

NameDescription
AxisGroup { get; set; }Gets or sets the axis group to which this series group belongs.
AxisX { get; }Provides access to properties of the X axis of this series group.
AxisY { get; }Provides access to properties of the Y axis of this series group.
BubbleScale { get; set; }Gets or sets the size of the bubbles as a percentage of their default size.
DoughnutHoleSize { get; set; }Gets or sets the hole size of the parent doughnut chart as a percentage.
FirstSliceAngle { get; set; }Gets or sets the angle, in degrees, of the first slice of the parent pie chart.
GapWidth { get; set; }Gets or sets the percentage of gap width between chart elements.
Overlap { get; set; }Gets or sets the percentage of how much the series bars or columns overlap.
SecondSectionSize { get; set; }Gets or sets the size of the pie chart secondary section as a percentage.
Series { get; }Gets a collection of series that belong to this series group.
SeriesType { get; }Gets the type of chart series included in this group.

Remarks

Combo charts contains multiple chart series groups, with a separate group for each series type.

Also, you can create a chart series group to assign secondary axes to one or more chart series.

To learn more, visit the Working with Charts documentation article.

Examples

Shows how to work with the secondary axis of chart.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape shape = builder.InsertChart(ChartType.Line, 450, 250);
Chart chart = shape.Chart;
ChartSeriesCollection series = chart.Series;

// Delete default generated series.
series.Clear();

string[] categories = new string[] { "Category 1", "Category 2", "Category 3" };
series.Add("Series 1 of primary series group", categories, new double[] { 2, 3, 4 });
series.Add("Series 2 of primary series group", categories, new double[] { 5, 2, 3 });

// Create an additional series group, also of the line type.
ChartSeriesGroup newSeriesGroup = chart.SeriesGroups.Add(ChartSeriesType.Line);
// Specify the use of secondary axes for the new series group.
newSeriesGroup.AxisGroup = AxisGroup.Secondary;
// Hide the secondary X axis.
newSeriesGroup.AxisX.Hidden = true;
// Define title of the secondary Y axis.
newSeriesGroup.AxisY.Title.Show = true;
newSeriesGroup.AxisY.Title.Text = "Secondary Y axis";

// Add a series to the new series group.
ChartSeries series3 =
    newSeriesGroup.Series.Add("Series of secondary series group", categories, new double[] { 13, 11, 16 });
series3.Format.Stroke.Weight = 3.5;

doc.Save(ArtifactsDir + "Charts.SecondaryAxis.docx");

See Also