I am looking for a way to change the direction of the pie charts of a layer from counter-clockwise to clockwise in QGIS 3. I looked in the docs but I don´t seem to find a way to do this. Does anybody know what I need to do?
I create the pie charts like this:
current_colors = {} # maps the field names to QColor objects
diagram = QgsPieDiagram()
ds = QgsDiagramSettings()
ds.categoryColors = current_colors.values()
ds.categoryAttributes = current_colors.keys()
ds.categoryLabels = ds.categoryAttributes
dr = QgsLinearlyInterpolatedDiagramRenderer()
max_val = layer.maximumValue(layer.fields().indexFromName(pie_sum_col))
dr.setUpperValue(max_val)
dr.setLowerSize(QSizeF(2, 2))
dr.setUpperSize(QSizeF(40, 40))
dr.setClassificationField(pie_sum_col)
dr.setDiagram(diagram)
dr.setDiagramSettings(ds)
layer.setDiagramRenderer(dr)
dls = QgsDiagramLayerSettings()
dls.setPlacement(1)
layer.setDiagramLayerSettings(dls)
layer.triggerRepaint()
current_colors
?