ScatterSeries QML Type | Qt Charts 5.7

Qt 5.7 | Qt Charts | QML Types | ScatterSeries QML Type

Qt 5.7.1 Reference Documentation

# ScatterSeries QML Type

The ScatterSeries type is used for making scatter charts. More...

Import Statement: | import QtCharts 2.1
Instantiates: | QScatterSeries
Inherits: | XYSeries

- List of all members, including inherited members

## Properties

- borderColor : color
- borderWidth : real
- brushFilename : QString
- markerShape : MarkerShape
- markerSize : real

## Signals

- onBorderColorChanged(color color)
- onColorChanged(color color)
- onMarkerShapeChanged(MarkerShape shape)
- onMarkerSizeChanged(real size)

## Detailed Description

The following QML shows how to create a chart with two simple scatter series:

      ChartView {
          title: "Scatters"
          anchors.fill: parent
          antialiasing: true

          ScatterSeries {
              id: scatter1
              name: "Scatter1"
              XYPoint { x: 1.5; y: 1.5 }
              XYPoint { x: 1.5; y: 1.6 }
              XYPoint { x: 1.57; y: 1.55 }
              XYPoint { x: 1.8; y: 1.8 }
              XYPoint { x: 1.9; y: 1.6 }
              XYPoint { x: 2.1; y: 1.3 }
              XYPoint { x: 2.5; y: 2.1 }
          }

          ScatterSeries {
              name: "Scatter2"

## Property Documentation

borderColor : color

Border (pen) color of the series.

borderWidth : real

The width of the border line. By default the width is 2.0.

brushFilename : QString

The name of the file used as a brush for the series.

markerShape : MarkerShape

Defines the shape of the marker used to draw the points in the series. One of ScatterSeries ScatterSeries.MarkerShapeCircle or ScatterSeries.MarkerShapeRectangle. The default shape is ScatterSeries.MarkerShapeCircle.

markerSize : real

Defines the size of the marker used to draw the points in the series. The default size is 15.0.

## Signal Documentation

onBorderColorChanged(color color)

Signal is emitted when the line (pen) color has changed to color.

onColorChanged(color color)

Signal is emitted when the fill (brush) color has changed to color.

onMarkerShapeChanged(MarkerShape shape)

Signal is emitted when the marker shape has changed to shape.

onMarkerSizeChanged(real size)

Signal is emitted when the marker size has changed to size.