Class: QgsPieChartPlot

A simple pie chart class.

Warning

This class is not considered stable API, and may change in future!

Added in version 4.0.

Class Hierarchy

Inheritance diagram of qgis.core.QgsPieChartPlot

Base classes

Qgs2DPlot

Base class for 2-dimensional plot/chart/graphs.

QgsPlot

Base class for plot/chart/graphs.

class qgis.core.QgsPieChartPlot[source]

Bases: Qgs2DPlot

colorRampAt(self, index: int) QgsColorRamp | None[source]

Returns the color ramp for the series with matching index.

Parameters:

index (int)

Return type:

Optional[QgsColorRamp]

colorRampCount(self) int[source]

Returns the color ramps list count.

Return type:

int

static create() QgsPieChartPlot | None[source]

Returns a new pie chart.

Return type:

Optional[QgsPieChartPlot]

static createDataGatherer(plot: QgsPlot | None) QgsVectorLayerAbstractPlotDataGatherer | None[source]

Returns a new data gatherer for a given pie chart plot.

Parameters:

plot (Optional[QgsPlot])

Return type:

Optional[QgsVectorLayerAbstractPlotDataGatherer]

fillSymbolAt(self, index: int) QgsFillSymbol | None[source]

Returns the fill symbol for the series with matching index.

Parameters:

index (int)

Return type:

Optional[QgsFillSymbol]

fillSymbolCount(self) int[source]

Returns the fill symbols list count.

Return type:

int

labelType(self) Qgis.PieChartLabelType[source]

Returns the pie chart label type.

Return type:

Qgis.PieChartLabelType

numericFormat(self) QgsNumericFormat | None[source]

Returns the numeric format used for the pie chart labels.

Return type:

Optional[QgsNumericFormat]

setColorRampAt(self, index: int, ramp: QgsColorRamp | None)[source]

Sets the color ramp for the series with matching index.

Parameters:
setFillSymbolAt(self, index: int, symbol: QgsFillSymbol | None)[source]

Sets the fill symbol to use for the series with matching index.

Parameters:
setLabelType(self, type: Qgis.PieChartLabelType)[source]

Sets the pie chart label type.

Parameters:

type (Qgis.PieChartLabelType)

setNumericFormat(self, format: QgsNumericFormat | None)[source]

Sets the numeric format used for the pie chart labels.

Ownership of format is transferred to the plot.

See also

numericFormat()

Parameters:

format (Optional[QgsNumericFormat])

setTextFormat(self, format: QgsTextFormat)[source]

Sets the text format used for the pie chart labels.

See also

textFormat()

Parameters:

format (QgsTextFormat)

textFormat(self) QgsTextFormat[source]

Returns the text format used for the pie chart labels.

See also

setTextFormat()

Return type:

QgsTextFormat