ChartSeriesGroup class

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.

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.

Properties

NameDescription
axis_groupGets or sets the axis group to which this series group belongs.
axis_xProvides access to properties of the X axis of this series group.
axis_yProvides access to properties of the Y axis of this series group.
bubble_scaleGets or sets the size of the bubbles as a percentage of their default size.
gap_widthGets or sets the percentage of gap width between chart elements.
overlapGets or sets the percentage of how much the series bars or columns overlap.
seriesGets a collection of series that belong to this series group.
series_typeGets the type of chart series included in this group.

Examples

Shows how to work with the secondary axis of chart.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_chart(chart_type=aw.drawing.charts.ChartType.LINE, width=450, height=250)
chart = shape.chart
series = chart.series
# Delete default generated series.
series.clear()
categories = ['Category 1', 'Category 2', 'Category 3']
series.add(series_name='Series 1 of primary series group', categories=categories, values=[2, 3, 4])
series.add(series_name='Series 2 of primary series group', categories=categories, values=[5, 2, 3])
# Create an additional series group, also of the line type.
new_series_group = chart.series_groups.add(aw.drawing.charts.ChartSeriesType.LINE)
# Specify the use of secondary axes for the new series group.
new_series_group.axis_group = aw.drawing.charts.AxisGroup.SECONDARY
# Hide the secondary X axis.
new_series_group.axis_x.hidden = True
# Define title of the secondary Y axis.
new_series_group.axis_y.title.show = True
new_series_group.axis_y.title.text = 'Secondary Y axis'
# Add a series to the new series group.
series3 = new_series_group.series.add(series_name='Series of secondary series group', categories=categories, values=[13, 11, 16])
series3.format.stroke.weight = 3.5
doc.save(file_name=ARTIFACTS_DIR + 'Charts.SecondaryAxis.docx')

See Also