solid method

solid()

Sets the fill to a uniform color.

def solid(self):
    ...

Remarks

Use this method to convert any of the fills back to solid fill.

solid(color)

Sets the fill to a specified uniform color.

def solid(self, color: aspose.pydrawing.Color):
    ...
ParameterTypeDescription
coloraspose.pydrawing.Color

Remarks

Use this method to convert any of the fills back to solid fill.

Examples

Shows how to use chart formating.

doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
shape = builder.insert_chart(chart_type=aw.drawing.charts.ChartType.COLUMN, width=432, height=252)
chart = shape.chart
# Delete series generated by default.
series = chart.series
series.clear()
categories = ['Category 1', 'Category 2']
series.add(series_name='Series 1', categories=categories, values=[1, 2])
series.add(series_name='Series 2', categories=categories, values=[3, 4])
# Format chart background.
chart.format.fill.solid(aspose.pydrawing.Color.dark_slate_gray)
# Hide axis tick labels.
chart.axis_x.tick_labels.position = aw.drawing.charts.AxisTickLabelPosition.NONE
chart.axis_y.tick_labels.position = aw.drawing.charts.AxisTickLabelPosition.NONE
# Format chart title.
chart.title.format.fill.solid(aspose.pydrawing.Color.light_goldenrod_yellow)
# Format axis title.
chart.axis_x.title.show = True
chart.axis_x.title.format.fill.solid(aspose.pydrawing.Color.light_goldenrod_yellow)
# Format legend.
chart.legend.format.fill.solid(aspose.pydrawing.Color.light_goldenrod_yellow)
doc.save(file_name=ARTIFACTS_DIR + 'Charts.ChartFormat.docx')

See Also