class QScatterSeries#

The QScatterSeries class presents data in scatter charts. More

Inheritance diagram of PySide6.QtCharts.QScatterSeries

Synopsis#

Properties#

  • borderColorᅟ - Color used to draw the marker borders

  • brushᅟ - Used to draw the scatter series markers

  • colorᅟ - Used to fill the series markers

  • markerShapeᅟ - Shape of the marker used to render the points in the series

  • markerSizeᅟ - Size of the marker used to render the points in the series

Methods#

Signals#

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#

The scatter data is displayed as a collection of points on the chart. For each point, two values are specified that determine its position on the horizontal axis and the vertical axis.

../../_images/examples_scatterchart.png

The following code snippet illustrates how to create a basic scatter chart:

QScatterSeries* series = new QScatterSeries();
series->append(0, 6);
series->append(2, 4);
...
chart->addSeries(series);

For more information, see Charts with Widgets Gallery and Creating Scatter Charts .

class MarkerShape#

This enum value describes the shape used when rendering marker items.

Constant

Description

QScatterSeries.MarkerShapeCircle

The marker is a circle. This is the default value.

QScatterSeries.MarkerShapeRectangle

The marker is a rectangle.

QScatterSeries.MarkerShapeRotatedRectangle

The marker is a rotated rectangle.

QScatterSeries.MarkerShapeTriangle

The marker is a triangle.

QScatterSeries.MarkerShapeStar

The marker is a star.

QScatterSeries.MarkerShapePentagon

The marker is a pentagon.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property borderColorᅟ: QColor#

This property holds The color used to draw the marker borders..

This is a convenience property for modifying the color of the pen.

See also

pen()

Access functions:
property brushᅟ: QBrush#

This property holds The brush used to draw the scatter series markers..

The brush can be an image that can be created using QPainterPath, for example.

Access functions:

property colorᅟ: QColor#

This property holds The color used to fill the series markers..

This is a convenience property for modifying the color of the brush.

See also

brush()

Access functions:
property markerShapeᅟ: QScatterSeries.MarkerShape#

This property holds The shape of the marker used to render the points in the series..

The default shape is MarkerShapeCircle .

See also

MarkerShape

Access functions:
property markerSizeᅟ: float#

This property holds The size of the marker used to render the points in the series..

See also

setMarkerSize

Access functions:
__init__([parent=None])#
Parameters:

parentQObject

Constructs a series object that is a child of parent.

borderColor()#
Return type:

QColor

See also

setBorderColor()

Getter of property borderColorᅟ .

borderColorChanged(color)#
Parameters:

colorQColor

This signal is emitted when the line (pen) color changes to color.

Notification signal of property borderColorᅟ .

colorChanged(color)#
Parameters:

colorQColor

This signal is emitted when the fill (brush) color changes to color.

Notification signal of property colorᅟ .

markerShape()#
Return type:

MarkerShape

See also

setMarkerShape()

Getter of property markerShapeᅟ .

markerShapeChanged(shape)#
Parameters:

shapeMarkerShape

This signal is emitted when the marker shape changes to shape.

Notification signal of property markerShapeᅟ .

markerSizeChanged(size)#
Parameters:

size – float

This signal is emitted when the marker size changes to size.

Notification signal of property markerSizeᅟ .

setBorderColor(color)#
Parameters:

colorQColor

See also

borderColor()

Setter of property borderColorᅟ .

setMarkerShape(shape)#
Parameters:

shapeMarkerShape

See also

markerShape()

Setter of property markerShapeᅟ .