Class: QgsPlotWidget¶
Base class for widgets which allow control over the properties of plots.
Added in version 4.0.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: createPlot()
, setPlot()
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as an inline panel. |
|
Abstract interface for generating an expression context. |
Subclasses¶
Widget class to control the properties of bar chart plots. |
|
Widget class to control the properties of line chart plots. |
|
Widget class to control the properties of pie chart plots. |
Abstract Methods
Creates a plot defined by the current settings in the widget. |
|
Sets the widget to match the settings of the plot. |
Methods
Initiate a data-defined property button tied to a plot widget. |
|
Register an expression context generator class that will be used to retrieve an expression context for configuration widgets when required. |
|
Initiate a data-defined property button tied to a plot widget. |
- class qgis.gui.QgsPlotWidget[source]¶
Bases:
QgsPanelWidget
,QgsExpressionContextGenerator
- __init__(parent: QWidget | None = None)
Constructor for QgsPlotWidget.
- Parameters:
parent (Optional[QWidget] = None) – parent widget
- abstract createPlot(self) QgsPlot | None [source]¶
Creates a plot defined by the current settings in the widget.
See also
- Return type:
Optional[QgsPlot]
- initializeDataDefinedButton(self, button: QgsPropertyOverrideButton | None, key: QgsPlot.DataDefinedProperty)[source]¶
Initiate a data-defined property button tied to a plot widget.
- Parameters:
button (Optional[QgsPropertyOverrideButton])
- registerExpressionContextGenerator(self, generator: QgsExpressionContextGenerator | None)[source]¶
Register an expression context generator class that will be used to retrieve an expression context for configuration widgets when required.
- Parameters:
generator (Optional[QgsExpressionContextGenerator])
- abstract setPlot(self, plot: QgsPlot | None)[source]¶
Sets the widget to match the settings of the
plot
. Ownership is not transferred.See also
- Parameters:
plot (Optional[QgsPlot])
- updateDataDefinedButton(self, button: QgsPropertyOverrideButton | None)[source]¶
Initiate a data-defined property button tied to a plot widget.
- Parameters:
button (Optional[QgsPropertyOverrideButton])