XYSeries QML Type | Qt Charts 5.13.2

Qt 5.13 | Qt Charts | QML Types | XYSeries QML Type

Qt Charts | Commercial or GPLv3

# XYSeries QML Type

A base type for line, spline, and scatter series. More...

Import Statement: | import QtCharts 2.13
Inherits: | AbstractSeries
Inherited By: | LineSeries, ScatterSeries, and SplineSeries

- List of all members, including inherited members

## Properties

- axisAngular : AbstractAxis
- axisRadial : AbstractAxis
- axisX : AbstractAxis
- axisXTop : AbstractAxis
- axisY : AbstractAxis
- axisYRight : AbstractAxis
- color : color
- pointLabelsClipping : bool
- pointLabelsColor : font
- pointLabelsFont : font
- pointLabelsFormat : string
- pointLabelsVisible : bool
- pointsVisible : bool

## Signals

- clicked(point)
- doubleClicked(point)
- hovered(point, bool state)
- pointAdded(index)
- pointRemoved(index)
- pointReplaced(index)
- pointsRemoved(index, int count)
- pointsReplaced()
- pressed(point)
- released(point)

## Methods

- append(x, real y)
- QPointF at(index)
- insert(index, real x, real y)
- remove(index)
- remove(x, real y)
- removePoints(index, int count)
- replace(oldX, real oldY, real newX, real newY)

## Detailed Description

## Property Documentation

axisAngular : AbstractAxis

The angular axis used for the series, drawn around the polar chart view.

See also axisX.

axisRadial : AbstractAxis

The radial axis used for the series, drawn inside the polar chart view.

See also axisY.

axisX : AbstractAxis

The x-axis used for the series. If you leave both axisX and axisXTop undefined, a value axis is created for the series.

See also axisXTop and ValueAxis.

axisXTop : AbstractAxis

The x-axis used for the series, drawn on top of the chart view.

Note: You can only provide either axisX or axisXTop, not both.

See also axisX.

axisY : AbstractAxis

The y-axis used for the series. If you leave both axisY and axisYRight undefined, a value axis is created for the series.

See also axisYRight and ValueAxis.

axisYRight : AbstractAxis

The y-axis used for the series, drawn to the right on the chart view.

Note: You can only provide either axisY or axisYRight, not both.

See also axisY.

color : color

The color of the series. This is the line (pen) color in case of LineSeries or SplineSeries and the fill (brush) color in case of ScatterSeries or AreaSeries.

pointLabelsClipping : bool

The clipping for data point labels. This property is `true` by default. The labels on the edge of the plot area are cut when clipping is enabled.

See also pointLabelsVisible.

pointLabelsColor : font

The color used for data point labels. By default, the color is the color of the brush defined in theme for labels.

See also pointLabelsFormat.

pointLabelsFont : font

The font used for data point labels.

See also pointLabelsFormat.

pointLabelsFormat : string

The format used for showing labels with data points.

See also pointLabelsVisible, pointLabelsFont, and pointLabelsColor.

pointLabelsVisible : bool

The visibility of data point labels. This property is `false` by default.

See also pointLabelsFormat and pointLabelsClipping.

pointsVisible : bool

Whether the data points are visible and should be drawn.

## Signal Documentation

clicked(point)

This signal is emitted when the user triggers a mouse event by clicking the point point in the chart. For example:

      LineSeries {
          XYPoint { x: 0; y: 0 }
          XYPoint { x: 1.1; y: 2.1 }
          onClicked: console.log("onClicked: " + point.x + ", " + point.y);
      }

The corresponding signal handler is `onClicked()`.

See also pressed(), released(), and doubleClicked().

doubleClicked(point)

This signal is emitted when the user double-clicks the data point point in the chart. The point is the point where the first press was triggered. For example:

      LineSeries {
          XYPoint { x: 0; y: 0 }
          XYPoint { x: 1.1; y: 2.1 }
          onDoubleClicked: console.log("onDoubleClicked: " + point.x + ", " + point.y);
      }

The corresponding signal handler is `onDoubleClicked()`.

See also pressed(), released(), and clicked().

hovered(point, bool state)

This signal is emitted when a mouse is hovered over the point point in the chart. When the mouse moves over the point, state turns `true`, and when the mouse moves away again, it turns `false`.

The corresponding signal handler is `onHovered()`.

pointAdded(index)

This signal is emitted when a point is added at the position specified by index.

The corresponding signal handler is `onPointAdded()`.

pointRemoved(index)

This signal is emitted when a point is removed from the position specified by index.

The corresponding signal handler is `onPointRemoved()`.

pointReplaced(index)

This signal is emitted when a point is replaced at the position specified by index.

The corresponding signal handler is `onPointReplaced()`.

pointsRemoved(index, int count)

This signal is emitted when the number of points specified by count is removed starting at the position specified by index.

The corresponding signal handler is `onPointRemoved()`.

pointsReplaced()

This signal is emitted when all points are replaced with other points.

The corresponding signal handler is `onPointsReplaced()`.

pressed(point)

This signal is emitted when the user presses the data point point in the chart and holds down the mouse button. For example:

      LineSeries {
          XYPoint { x: 0; y: 0 }
          XYPoint { x: 1.1; y: 2.1 }
          onPressed: console.log("onPressed: " + point.x + ", " + point.y);
      }

The corresponding signal handler is `onPressed()`.

See also clicked(), released(), and doubleClicked().

released(point)

This signal is emitted when the user releases the mouse press on the data point specified by point. For example:

      LineSeries {
          XYPoint { x: 0; y: 0 }
          XYPoint { x: 1.1; y: 2.1 }
          onReleased: console.log("onReleased: " + point.x + ", " + point.y);
      }

The corresponding signal handler is `onReleased()`.

See also pressed(), clicked(), and doubleClicked().

## Method Documentation

append(x, real y)

Appends a point with the coordinates x and y to the series.

QPointF at(index)

Returns the point at the position specified by index. Returns (0, 0) if the index is not valid.

insert(index, real x, real y)

Inserts a point with the coordinates x and y to the position specified by index in the series. If the index is 0 or less than 0, the point is prepended to the list of points. If the index is equal to or greater than than the number of points in the series, the point is appended to the list of points.

remove(index)

Removes the point at the position specified by index from the series.

remove(x, real y)

Removes the point with the coordinates x and y from the series. Does nothing if the point does not exist.

removePoints(index, int count)

Removes the number of points specified by count from the series starting at the position specified by index.

replace(oldX, real oldY, real newX, real newY)

Replaces the point with the coordinates oldX and oldY with the point with the coordinates newX and newY. Does nothing if the old point does not exist.