Class: QgsDiagramSettings

class qgis.core.QgsDiagramSettings

Bases: sip.wrapper

Constructor for QgsDiagramSettings

QgsDiagramSettings(QgsDiagramSettings)

Stores the settings for rendering a single diagram.

QgsDiagramSettings stores the settings related to rendering the individual diagrams themselves, while QgsDiagramLayerSettings stores settings which control how ALL diagrams within a layer are rendered.

Methods

legendItems

Returns list of legend nodes for the diagram

readXml

Reads diagram settings from XML

writeXml

Writes diagram settings to XML

Attributes

Down

Height

Left

Right

Up

XHeight

qgis.core.QgsDiagramSettings.backgroundColor

qgis.core.QgsDiagramSettings.barWidth

qgis.core.QgsDiagramSettings.categoryAttributes

qgis.core.QgsDiagramSettings.categoryColors

qgis.core.QgsDiagramSettings.categoryLabels

qgis.core.QgsDiagramSettings.diagramOrientation

qgis.core.QgsDiagramSettings.enabled

qgis.core.QgsDiagramSettings.font

qgis.core.QgsDiagramSettings.labelPlacementMethod

qgis.core.QgsDiagramSettings.lineSizeScale

qgis.core.QgsDiagramSettings.lineSizeUnit

qgis.core.QgsDiagramSettings.maximumScale

qgis.core.QgsDiagramSettings.minimumScale

qgis.core.QgsDiagramSettings.minimumSize

qgis.core.QgsDiagramSettings.opacity

qgis.core.QgsDiagramSettings.penColor

qgis.core.QgsDiagramSettings.penWidth

qgis.core.QgsDiagramSettings.rotationOffset

qgis.core.QgsDiagramSettings.scaleBasedVisibility

qgis.core.QgsDiagramSettings.scaleByArea

qgis.core.QgsDiagramSettings.size

qgis.core.QgsDiagramSettings.sizeScale

qgis.core.QgsDiagramSettings.sizeType

class DiagramOrientation

Bases: int

Down = 1
Height = 0
class LabelPlacementMethod

Bases: int

Left = 2
Right = 3
Up = 0
XHeight = 1
backgroundColor
barWidth
categoryAttributes
categoryColors
categoryLabels
diagramOrientation
enabled
font
labelPlacementMethod
legendItems(self, nodeLayer: QgsLayerTreeLayer) → List[QgsLayerTreeModelLegendNode]

Returns list of legend nodes for the diagram

Note

caller is responsible for deletion of QgsLayerTreeModelLegendNodes

New in version 2.10.

Parameters

nodeLayer (QgsLayerTreeLayer) –

Return type

List[QgsLayerTreeModelLegendNode]

lineSizeScale
lineSizeUnit
maximumScale
minimumScale
minimumSize
opacity
penColor
penWidth
readXml(self, elem: QDomElement)

Reads diagram settings from XML

Parameters

elem (QDomElement) –

rotationOffset
scaleBasedVisibility
scaleByArea
size
sizeScale
sizeType
writeXml(self, rendererElem: QDomElement, doc: QDomDocument)

Writes diagram settings to XML

Parameters
  • rendererElem (QDomElement) –

  • doc (QDomDocument) –