A parent type for all x & y series types. 更多...
| import 语句: |
import QtGraphs
|
| 在 C++: | QXYSeries |
| 继承: | |
| 继承者: |
In XYSeries, data points are defined as a list of point types, defining X and Y positions.
|
color : color |
The main color of the series. For LineSeries this means the line color and for ScatterSeries the color of the point
|
count
:
int
|
返回系列中的数据点数。
|
pointDelegate : 组件 |
A custom QML Component used as a marker for data points.
The dynamic properties available for this component are:
| 类型 | 名称 | 描述 |
|---|---|---|
| bool | pointSelected | This value is true when the point is selected. |
| 颜色 | pointColor | The color of the series. This value comes either from the GraphsTheme or from XYSeries::color 若 XYSeries overrides the color. |
| 颜色 | pointBorderColor | The border color of the series. This value comes from the GraphsTheme . |
| 颜色 | pointSelectedColor | The selected color of the series. This value comes either from the GraphsTheme or from XYSeries::selectedColor 若 XYSeries overrides the color. |
| real | pointBorderWidth | The border width of the series. This value comes from the GraphsTheme . |
| real | pointValueX | The value of the XYPoint::x at this position. |
| real | pointValueY | The value of the XYPoint::y at this position. |
To use any of these, add property with the defined name into your custom component. For example
"property color pointColor"
and
"property real pointValueX"
.
|
selectedColor : color |
The color of selected points.
The indexes of the points which are currently selected.
|
colorChanged ( color color ) |
This signal is emitted when the line color changes to color .
注意:
相应处理程序是
onColorChanged
.
|
draggableChanged () |
This signal is emitted when a series becomes draggable by a mouse/touch or becomes fixed.
注意:
相应处理程序是
onDraggableChanged
.
|
pointMarkerChanged () |
This signal is emitted when a point is changed.
注意:
相应处理程序是
onPointMarkerChanged
.
|
pointReplaced ( int index ) |
This signal is emitted when a point is replaced at the position specified by index .
注意:
相应处理程序是
onPointReplaced
.
|
pointsReplaced () |
This signal is emitted when all points are replaced.
注意:
相应处理程序是
onPointsReplaced
.
|
selectedColorChanged ( color color ) |
This signal is emitted when the color of selected series changes to color .
注意:
相应处理程序是
onSelectedColorChanged
.
|
selectedPointsChanged () |
This signal is emitted when the set of selected points changes.
注意:
相应处理程序是
onSelectedPointsChanged
.
Appends points with the coordinates points 到系列。
|
append ( point point ) |
Appends a point with the coordinates point 到系列。
Appends a point with the coordinates x and y 到系列。
Returns the point at the position specified by index . Returns (0, 0) if the index is not valid.
|
clear () |
从系列删除所有点。
|
deselectAllPoints () |
Deselects all points in the series.
注意: Emits QXYSeries::selectedPointsChanged
另请参阅 setPointSelected ().
|
deselectPoint ( int index ) |
Deselects point at given index .
注意: Emits QXYSeries::selectedPointsChanged
另请参阅 setPointSelected ().
Marks multiple points passed in a indexes list as deselected.
注意: Emits QXYSeries::selectedPointsChanged
另请参阅 setPointSelected ().
Finds and returns the index of the first matching point found as defined by point . Returns -1 if the point is not found.
Inserts a point with the coordinates point 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.
Returns true if point at given index is among selected points and false otherwise.
注意: Selected points are drawn using the selected color if it was specified.
另请参阅 selectedPoints , setPointSelected (),和 selectedColor .
|
remove ( int index ) |
Removes the point at the position specified by index from the series.
|
remove ( point point ) |
Removes the point with the coordinates point from the series. Does nothing if the point does not exist.
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 current points with the points specified by points
注意: This is much faster than replacing data points one by one, or first clearing all data, and then appending the new data. Emits pointsReplaced when the points have been replaced.
Replaces the point at the position specified by index with the point that has the coordinates newPoint .
Replaces the point with the coordinates oldPoint with the point with the coordinates newPoint . Does nothing if the old point does not exist.
Replaces the point at the position specified by index with the point that has the coordinates newX and 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.
|
selectAllPoints () |
Marks all points in the series as selected,
注意: Emits QXYSeries::selectedPointsChanged
另请参阅 setPointSelected ().
|
selectPoint ( int index ) |
Marks point at index as selected.
注意: Emits QXYSeries::selectedPointsChanged
另请参阅 setPointSelected ().
Marks multiple points passed in a indexes list as selected.
注意: Emits QXYSeries::selectedPointsChanged
另请参阅 setPointSelected ().
Marks point at given index as either selected or deselected as specified by selected .
注意: Selected points are drawn using the selected color if it was specified. Emits QXYSeries::selectedPointsChanged
另请参阅 isPointSelected (), selectAllPoints (),和 selectedColor .
Takes a point, specified by
point
, out of the series if found. Returns
true
if the operation is successful.
Changes selection state of points at given indexes to the opposite one.
注意: Emits QXYSeries::selectedPointsChanged
另请参阅 setPointSelected ().