- class QChartView#
The
QChartView
is a standalone widget that can display charts. More…Synopsis#
Methods#
def
__init__()
def
chart()
def
rubberBand()
def
setChart()
def
setRubberBand()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
A chart view does not require a QGraphicsScene object to work. To display a chart in an existing QGraphicsScene, the
QChart
orQPolarChart
class should be used instead.See also
- class RubberBand#
(inherits
enum.Flag
) 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.
Constructs a chart view object with the parent
parent
to display the chartchart
. The ownership of the chart is passed to the chart view.- __init__([parent=None])
- Parameters:
parent –
QWidget
Constructs a chart view object with the parent
parent
.Returns the pointer to the associated chart.
See also
- rubberBand()#
- Return type:
Combination of
RubberBand
Returns the rubber band flags that are currently being used by the chart view.
See also
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
- setRubberBand(rubberBands)#
- Parameters:
rubberBands – Combination of
RubberBand
Sets the rubber band flags to
rubberBand
. The selected flags determine the way zooming is performed.