Class: QgsSingleCategoryDiagramRenderer

class qgis.core.QgsSingleCategoryDiagramRenderer

Bases: QgsDiagramRenderer

Renders the diagrams for all features with the same settings

QgsSingleCategoryDiagramRenderer() Constructor for QgsSingleCategoryDiagramRenderer

QgsSingleCategoryDiagramRenderer(QgsSingleCategoryDiagramRenderer)

Methods

clone

rtype

QgsSingleCategoryDiagramRenderer

convertSizeToMapUnits

Converts size from mm to map units

diagramAttributes

rtype

List[str]

diagramSettings

diagramSettings(self, feature: QgsFeature, c: QgsRenderContext, s: QgsDiagramSettings) -> bool

diagramSize

param a0

dpiPaintDevice

Returns the paint device dpi (or -1 in case of error

legendItems

param nodeLayer

readXml

param elem

rendererName

rtype

str

setDiagramSettings

param s

writeXml

param layerElem

clone(self)QgsSingleCategoryDiagramRenderer
Return type

QgsSingleCategoryDiagramRenderer

convertSizeToMapUnits(self, size: QSizeF, context: QgsRenderContext)

Converts size from mm to map units

diagramAttributes(self)List[str]
Return type

List[str]

diagramSettings(self)List[QgsDiagramSettings]

diagramSettings(self, feature: QgsFeature, c: QgsRenderContext, s: QgsDiagramSettings) -> bool

Return type

List[QgsDiagramSettings]

diagramSize(self, a0: QgsFeature, c: QgsRenderContext)QSizeF
Parameters
Return type

QSizeF

dpiPaintDevice(QPainter)int

Returns the paint device dpi (or -1 in case of error

legendItems(self, nodeLayer: QgsLayerTreeLayer)List[QgsLayerTreeModelLegendNode]
Parameters

nodeLayer (QgsLayerTreeLayer) –

Return type

List[QgsLayerTreeModelLegendNode]

readXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters
rendererName(self)str
Return type

str

setDiagramSettings(self, s: QgsDiagramSettings)
Parameters

s (QgsDiagramSettings) –

writeXml(self, layerElem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext)
Parameters