QChartView¶
The QChartView
is a standalone widget that can display charts. More…
Synopsis¶
Functions¶
def
chart
()def
rubberBand
()def
setChart
(chart)def
setRubberBand
(rubberBands)
Detailed Description¶
A chart view does not require a QGraphicsScene
object to work. To display a chart in an existing QGraphicsScene
, the QChart
or QPolarChart
class should be used instead.
See also
- class PySide6.QtCharts.QChartView(chart[, parent=None])¶
PySide6.QtCharts.QChartView([parent=None])
- Parameters
chart –
PySide6.QtCharts.QChart
parent –
PySide6.QtWidgets.QWidget
Constructs a chart view object with the parent parent
to display the chart chart
. The ownership of the chart is passed to the chart view.
Constructs a chart view object with the parent parent
.
- PySide6.QtCharts.QChartView.RubberBand¶
This enum describes the different types of rubber band effects that can be applied to the rectangular zooming area.
Constant
Description
QChartView.NoRubberBand
No zooming area is specified, and therefore zooming is not enabled.
QChartView.VerticalRubberBand
The rubber band is locked to the size of the chart horizontally and can be pulled vertically to specify the zooming area.
QChartView.HorizontalRubberBand
The rubber band is locked to the size of the chart vertically and can be pulled horizontally to specify the zooming area.
QChartView.RectangleRubberBand
The rubber band is fixed to the point that was clicked and can be pulled both vertically and horizontally.
QChartView.ClickThroughRubberBand
An option on the above rubber band choices that allows left clicks to be passed on to chart items if those chart items accept clicks. To select this, OR it with one of the rubber band selection modes.
- PySide6.QtCharts.QChartView.chart()¶
- Return type
Returns the pointer to the associated chart.
See also
- PySide6.QtCharts.QChartView.rubberBand()¶
- Return type
RubberBands
Returns the rubber band flags that are currently being used by the chart view.
See also
- PySide6.QtCharts.QChartView.setChart(chart)¶
- Parameters
chart –
PySide6.QtCharts.QChart
Sets the current chart to chart
. The ownership of the new chart is passed to the chart view and the ownership of the previous chart is released.
To avoid memory leaks, the previous chart must be deleted.
See also
- PySide6.QtCharts.QChartView.setRubberBand(rubberBands)¶
- Parameters
rubberBands –
RubberBands
Sets the rubber band flags to rubberBand
. The selected flags determine the way zooming is performed.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.