XYSeries QML Type
A base type for line, spline, and scatter series. 更多...
Import Statement: | import QtCharts 2.2 |
Instantiates: | QXYSeries |
基类: | |
派生类: |
属性
- 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
信号
- clicked(point point)
- doubleClicked(point point)
- hovered(point point, bool state)
- pointAdded(int index)
- pointRemoved(int index)
- pointReplaced(int index)
- pointsRemoved(int index, int count)
- pointsReplaced()
- pressed(point point)
- released(point point)
方法
- append(real x, real y)
- QPointF at(int index)
- insert(int index, real x, real y)
- remove(int index)
- remove(real x, real y)
- removePoints(int index, int count)
- replace(real oldX, real oldY, real newX, real newY)
详细描述
属性
axisAngular : AbstractAxis |
The angular axis used for the series, drawn around the polar chart view.
参见 axisX.
axisRadial : AbstractAxis |
The radial axis used for the series, drawn inside the polar chart view.
参见 axisY.
axisX : AbstractAxis |
axisXTop : AbstractAxis |
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.
参见 axisYRight and ValueAxis.
axisYRight : AbstractAxis |
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.
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.
The color used for data point labels. By default, the color is the color of the brush defined in theme for labels.
The font used for data point labels.
The format used for showing labels with data points.
参见 pointLabelsVisible, pointLabelsFont, and pointLabelsColor.
The visibility of data point labels. This property is false
by default.
参见 pointLabelsFormat and pointLabelsClipping.
信号
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()
.
参见 pressed(), released(), and doubleClicked().
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()
.
参见 pressed(), released(), and clicked().
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()
.
This signal is emitted when a point is added at the position specified by index.
The corresponding signal handler is onPointAdded()
.
This signal is emitted when a point is removed from the position specified by index.
The corresponding signal handler is onPointRemoved()
.
This signal is emitted when a point is replaced at the position specified by index.
The corresponding signal handler is onPointReplaced()
.
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()
.
This signal is emitted when all points are replaced with other points.
The corresponding signal handler is onPointsReplaced()
.
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()
.
参见 clicked(), released(), and doubleClicked().
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()
.
参见 pressed(), clicked(), and doubleClicked().
成员
Returns the point at the position specified by index. Returns (0, 0) if the index is not valid.
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.
Removes the point with the coordinates x and y from the series. Does nothing if the point does not exist.
Removes the number of points specified by count from the series starting at the position specified by index.
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.