XYSeries QML Type

The XYSeries type is a base type for line, spline and scatter series. More...

Import Statement: import QtCharts 2.2
Instantiates: QXYSeries
Inherits:

AbstractSeries

Inherited By:

LineSeries, ScatterSeries, and SplineSeries

Properties

Signals

Methods

Detailed Description

The XYSeries class is a base class for line, spline and scatter series. The class cannot be instantiated directly.

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 ValueAxis is created for the series.

See also axisXTop.


axisXTop : AbstractAxis

The x axis used for the series, drawn on top of the chart view. Note that you can only provide either axisX or axisXTop, but not both.

See also axisX.


axisY : AbstractAxis

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

See also axisYRight.


axisYRight : AbstractAxis

The y axis used for the series, drawn to the right on the chart view. Note that you can only provide either axisY or axisYRight, but not both.

See also axisY.


color : color

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


pointLabelsClipping : bool

Defines the clipping for data point labels. True by default. The labels on the edge of the plot area are cut when clipping is enabled.

See also pointLabelsVisible.


pointLabelsColor : font

Defines 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

Defines the font used for data point labels.

See also pointLabelsFormat.


pointLabelsFormat : string

The format used for showing labels with series points.

See also pointLabelsFormat, pointLabelsVisible, pointLabelsFont, and pointLabelsColor.


pointLabelsVisible : bool

Defines the visibility for data point labels.

See also pointLabelsFormat and pointLabelsClipping.


pointsVisible : bool

Controls if the data points are visible and should be drawn.


Signal Documentation

onClicked(QPointF point)

Signal is emitted when user clicks the point on chart. The point is the point where the press was triggered. For example:

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

See also onPressed, onReleased, and onDoubleClicked.


onColorChanged(color color)

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


onDoubleClicked(QPointF point)

Signal is emitted when user doubleclicks the point on 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);
}

See also onPressed, onReleased, and onClicked.


onHovered(point point, bool state)

This signal is emitted when user has hovered over or away from the series. point shows the origin (coordinate) of the hover event. state is true when user has hovered over the series and false when hover has moved away from the series.


onPointAdded(int index)

Signal is emitted when a point has been added at index.


onPointLabelsClippingChanged(bool clipping)

The clipping of the data point labels is changed to clipping.


onPointLabelsColorChanged(Color color)

The color used for data point labels is changed to color.


onPointLabelsFontChanged(Font font)

The font used for data point labels is changed to font.


onPointLabelsFormatChanged(string format)

Signal is emitted when the format of data point labels is changed.


onPointLabelsVisibilityChanged(bool visible)

The visibility of the data point labels is changed to visible.


onPointRemoved(int index)

Signal is emitted when a point has been removed from index.


onPointReplaced(int index)

Signal is emitted when a point has been replaced at index.


onPointsRemoved(int index, int count)

Signal is emitted when a count of points has been removed starting at index.


onPointsReplaced()

Signal is emitted when all points have been replaced with other points.


onPressed(QPointF point)

Signal is emitted when user presses the point on chart. For example:

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

See also onClicked, onReleased, and onDoubleClicked.


onReleased(QPointF point)

Signal is emitted when user releases a press that was triggered on a point on chart. For example:

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

See also onPressed, onClicked, and onDoubleClicked.


Method Documentation

append(real x, real y)

Append point (x, y) to the series


QPointF at(int index)

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


insert(int index, real x, real y)

Inserts point (x, y) to the index. If index is 0 or smaller than 0 the point is prepended to the list of points. If index is the same as or bigger than count, the point is appended to the list of points.


remove(int index)

Removes a point from the series at index.


remove(real x, real y)

Removes point (x, y) from the series. Does nothing, if point (x, y) does not exist.


removePoints(int index, int count)

Removes count points from the series starting at index.


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

Replaces point (oldX, oldY) with point (newX, newY). Does nothing, if point (oldX, oldY) does not exist.


© 2017 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.