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¶
Base classes¶
Base class for 2-dimensional plot/chart/graphs. |
|
Base class for plot/chart/graphs. |
Methods
Returns the color ramp for the series with matching index. |
|
Returns the color ramps list count. |
|
Returns the fill symbol for the series with matching index. |
|
Returns the fill symbols list count. |
|
Returns the pie chart label type. |
|
Returns the numeric format used for the pie chart labels. |
|
Sets the color ramp for the series with matching index. |
|
Sets the fill symbol to use for the series with matching index. |
|
Sets the pie chart label type. |
|
Sets the numeric format used for the pie chart labels. |
|
Sets the text format used for the pie chart labels. |
|
Returns the text format used for the pie chart labels. |
Static Methods
Returns a new pie chart. |
|
Returns a new data gatherer for a given pie chart plot. |
- 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]
- 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]
- labelType(self) Qgis.PieChartLabelType [source]¶
Returns the pie chart label type.
- Return type:
- numericFormat(self) QgsNumericFormat | None [source]¶
Returns the numeric format used for the pie chart labels.
See also
- Return type:
Optional[QgsNumericFormat]
- setColorRampAt(self, index: int, ramp: QgsColorRamp | None)[source]¶
Sets the color
ramp
for the series with matchingindex
.- Parameters:
index (int)
ramp (Optional[QgsColorRamp])
- setFillSymbolAt(self, index: int, symbol: QgsFillSymbol | None)[source]¶
Sets the fill
symbol
to use for the series with matchingindex
.- Parameters:
index (int)
symbol (Optional[QgsFillSymbol])
- 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
- Parameters:
format (Optional[QgsNumericFormat])
- setTextFormat(self, format: QgsTextFormat)[source]¶
Sets the text
format
used for the pie chart labels.See also
- Parameters:
format (QgsTextFormat)
- textFormat(self) QgsTextFormat [source]¶
Returns the text format used for the pie chart labels.
See also
- Return type: