- class QXYSeries¶
The
QXYSeries
class is a parent class for all x & y series classes. More…Inherited by:
QScatterSeries
,QLineSeries
,QSplineSeries
Synopsis¶
Properties¶
colorᅟ
- Main color of the series. For QLineSeries this means the line color and for QScatterSeries the color of the pointselectedColorᅟ
- Main color of the selected series. For QLineSeries this means the line color and for QScatterSeries the color of the point
Methods¶
def
append()
def
at()
def
bestFitLinePen()
def
brush()
def
clear()
def
colorBy()
def
count()
def
deselectPoint()
def
deselectPoints()
def
insert()
def
lightMarker()
def
markerSize()
def
pen()
def
points()
def
pointsVector()
def
pointsVisible()
def
remove()
def
removePoints()
def
replace()
def
selectPoint()
def
selectPoints()
def
selectedColor()
def
selectedPoints()
def
setLightMarker()
def
setMarkerSize()
def
sizeBy()
Virtual methods¶
def
color()
def
setBrush()
def
setColor()
def
setPen()
Signals¶
def
clicked()
def
colorChanged()
def
doubleClicked()
def
hovered()
def
penChanged()
def
pointAdded()
def
pointRemoved()
def
pointReplaced()
def
pointsRemoved()
def
pointsReplaced()
def
pressed()
def
released()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
In
QXYSeries
, data points are defined as a list of QPointF, defining X and Y positions.See also
- class PointConfiguration¶
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- Access functions:
- property bestFitLineVisibleᅟ: bool¶
- Access functions:
This property holds The main color of the series. For
QLineSeries
this means the line color and forQScatterSeries
the color of the point..- Access functions:
Signal
colorChanged()
- property pointLabelsClippingᅟ: bool¶
- Access functions:
- Access functions:
- Access functions:
- property pointLabelsFormatᅟ: str¶
- Access functions:
- property pointLabelsVisibleᅟ: bool¶
- Access functions:
- property pointsVisibleᅟ: bool¶
- Access functions:
This property holds The main color of the selected series. For
QLineSeries
this means the line color and forQScatterSeries
the color of the point..- Access functions:
- append(points)¶
- Parameters:
points – .list of QPointF
Appends points with the coordinates
points
to the series.- append(point)
- Parameters:
point –
QPointF
- append(x, y)
- Parameters:
x – float
y – float
Appends a point with the coordinates
x
andy
to the series.Returns the point at the position specified by
index
. Returns (0, 0) if the index is not valid.Getter of property
bestFitLineColorᅟ
.Notification signal of property
bestFitLineColorᅟ
.- bestFitLineEquation(ok)¶
- Parameters:
ok – bool
- Return type:
.std.pairqreal,qreal
- bestFitLineVisibilityChanged(visible)¶
- Parameters:
visible – bool
Notification signal of property
bestFitLineVisibleᅟ
.- bestFitLineVisible()¶
- Return type:
bool
Getter of property
bestFitLineVisibleᅟ
.- clear()¶
Removes all points from the series.
- clearPointConfiguration(index)¶
- Parameters:
index – int
- clearPointConfiguration(index, key)
- Parameters:
index – int
key –
PointConfiguration
- clearPointsConfiguration()¶
- clearPointsConfiguration(key)
- Parameters:
key –
PointConfiguration
- color()¶
- Return type:
See also
Getter of property
colorᅟ
.- colorBy(sourceData[, gradient=QLinearGradient()])¶
- Parameters:
sourceData – .list of qreal
gradient –
QLinearGradient
Notification signal of property
colorᅟ
.- count()¶
- Return type:
int
- deselectAllPoints()¶
Deselects all points in the series.
- deselectPoint(index)¶
- Parameters:
index – int
Deselects point at given
index
.- deselectPoints(indexes)¶
- Parameters:
indexes – .list of int
Marks multiple points passed in a
indexes
list as deselected.Inserts a point with the coordinates
point
to the position specified byindex
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.- isPointSelected(index)¶
- Parameters:
index – int
- Return type:
bool
- markerSize()¶
- Return type:
float
- markerSizeChanged(size)¶
- Parameters:
size – float
- pointAdded(index)¶
- Parameters:
index – int
- pointConfiguration(index)¶
- Parameters:
index – int
- Return type:
Dictionary with keys of type .QXYSeries.PointConfiguration and values of type QVariant.
- pointLabelsClipping()¶
- Return type:
bool
Getter of property
pointLabelsClippingᅟ
.- pointLabelsClippingChanged(clipping)¶
- Parameters:
clipping – bool
Notification signal of property
pointLabelsClippingᅟ
.Getter of property
pointLabelsColorᅟ
.Notification signal of property
pointLabelsColorᅟ
.Getter of property
pointLabelsFontᅟ
.Notification signal of property
pointLabelsFontᅟ
.- pointLabelsFormat()¶
- Return type:
str
Getter of property
pointLabelsFormatᅟ
.- pointLabelsFormatChanged(format)¶
- Parameters:
format – str
Notification signal of property
pointLabelsFormatᅟ
.- pointLabelsVisibilityChanged(visible)¶
- Parameters:
visible – bool
Notification signal of property
pointLabelsVisibleᅟ
.- pointLabelsVisible()¶
- Return type:
bool
Getter of property
pointLabelsVisibleᅟ
.- pointRemoved(index)¶
- Parameters:
index – int
- pointReplaced(index)¶
- Parameters:
index – int
This signal is emitted when a point is replaced at the position specified by
index
.See also
Returns the points in the series.
- pointsConfiguration()¶
- Return type:
Dictionary with keys of type .int and values of type QXYSeries.PointConfiguration.
- pointsConfigurationChanged(configuration)¶
- Parameters:
configuration – Dictionary with keys of type .int and values of type QXYSeries.PointConfiguration.
- pointsRemoved(index, count)¶
- Parameters:
index – int
count – int
- pointsReplaced()¶
This signal is emitted when all points are replaced.
- pointsVisible()¶
- Return type:
bool
Getter of property
pointsVisibleᅟ
.- remove(index)
- Parameters:
index – int
- remove(x, y)
- Parameters:
x – float
y – float
Removes the point with the coordinates
x
andy
from the series. Does nothing if the point does not exist.- removePoints(index, count)¶
- Parameters:
index – int
count – int
- replace(points)¶
- Parameters:
points – .list of QPointF
Replaces the current points with the points specified by
points
Note
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.- replace(index, newPoint)
- Parameters:
index – int
newPoint –
QPointF
- replace(index, newX, newY)
- Parameters:
index – int
newX – float
newY – float
Replaces the point at the position specified by
index
with the point that has the coordinatesnewX
andnewY
.- replace(oldX, oldY, newX, newY)
- Parameters:
oldX – float
oldY – float
newX – float
newY – float
Replaces the point with the coordinates
oldX
andoldY
with the point with the coordinatesnewX
andnewY
. Does nothing if the old point does not exist.- selectAllPoints()¶
Marks all points in the series as selected,
- selectPoint(index)¶
- Parameters:
index – int
Marks point at
index
as selected.- selectPoints(indexes)¶
- Parameters:
indexes – .list of int
Marks multiple points passed in a
indexes
list as selected.- selectedColor()¶
- Return type:
See also
Notification signal of property
selectedColorᅟ
.- selectedPoints()¶
- Return type:
.list of int
Returns a list of points indexes marked as selected. Selected points are visible regardless of points visibility.
See also
- selectedPointsChanged()¶
Setter of property
bestFitLineColorᅟ
.- setBestFitLineVisible([visible=true])¶
- Parameters:
visible – bool
Setter of property
bestFitLineVisibleᅟ
.Setter of property
colorᅟ
.- setMarkerSize(size)¶
- Parameters:
size – float
- setPointConfiguration(index, configuration)¶
- Parameters:
index – int
configuration – Dictionary with keys of type .QXYSeries.PointConfiguration and values of type QVariant.
- setPointConfiguration(index, key, value)
- Parameters:
index – int
key –
PointConfiguration
value – object
- setPointLabelsClipping([enabled=true])¶
- Parameters:
enabled – bool
Setter of property
pointLabelsClippingᅟ
.Setter of property
pointLabelsColorᅟ
.Setter of property
pointLabelsFontᅟ
.- setPointLabelsFormat(format)¶
- Parameters:
format – str
Setter of property
pointLabelsFormatᅟ
.- setPointLabelsVisible([visible=true])¶
- Parameters:
visible – bool
Setter of property
pointLabelsVisibleᅟ
.- setPointSelected(index, selected)¶
- Parameters:
index – int
selected – bool
Marks point at given
index
as either selected or deselected as specified byselected
.Note
Selected points are drawn using the selected color if it was specified. Emits
selectedPointsChanged
- setPointsConfiguration(pointsConfiguration)¶
- Parameters:
pointsConfiguration – Dictionary with keys of type .int and values of type QXYSeries.PointConfiguration.
- setPointsVisible([visible=true])¶
- Parameters:
visible – bool
Setter of property
pointsVisibleᅟ
.Setter of property
selectedColorᅟ
.- sizeBy(sourceData, minSize, maxSize)¶
- Parameters:
sourceData – .list of qreal
minSize – float
maxSize – float
- toggleSelection(indexes)¶
- Parameters:
indexes – .list of int
Changes selection state of points at given
indexes
to the opposite one.