ChartStyle enumeration

ChartStyle enumeration

Specifies predefined styles of a chart.

Members

NameDescription
NORMALRepresents the default chart style.
MUTEDA style with muted colors.
SATURATEDA style with more saturated colors.
SHADEDA style with shaded data points.
FLATA style with flat data points without gradient.
SHADOWEDA style with data points having a shadow.
GRADIENTA style with gradient fill of data points.
ORIGINALA style with an original appearance of a chart.
TRANSPARENT1A style with transparent data points.
TRANSPARENT2A style with transparent data points.
OUTLINEA style with data points having no fill, but only an outline.
OUTLINE_BLACKA style with black chart background, in which data points have no fill, but only an outline.
BLACKA style with black chart background.
GREYA style with gray gradient chart background.
BLUEA style with blue chart background.
SHADED_PLOTA style, in which the plot area is shaded.

Examples

Shows how to set and get chart style.

doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
# Insert a chart in the Black style.
builder.insert_chart(chart_type=aw.drawing.charts.ChartType.COLUMN, width=400, height=250, chart_style=aw.drawing.charts.ChartStyle.BLACK)
doc.save(file_name=ARTIFACTS_DIR + 'Charts.SetChartStyle.docx')
doc = aw.Document(file_name=ARTIFACTS_DIR + 'Charts.SetChartStyle.docx')
# Get a chart to update.
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
chart = shape.chart
# Get the chart style.
self.assertEqual(aw.drawing.charts.ChartStyle.BLACK, chart.style)

See Also