XYSeriesMixin
Sub classes
| Name |
Children |
Inherits |
XYSeries prettyqt.charts.xyseries
|
|
|
ScatterSeries prettyqt.charts.scatterseries
|
|
|
LineSeries prettyqt.charts.lineseries QLineSeries with some custom properties. |
|
|
Base classes
| Name |
Children |
Inherits |
AbstractSeriesMixin prettyqt.charts.abstractseries
|
|
|
object builtins The base class of the class hierarchy. |
- type
async_generatorbytearray_iterator- bytearray
bytes_iterator- bytes
builtin_function_or_methodcallable_iteratorPyCapsulecellclassmethod_descriptor- ...
|
|
⋔ Inheritance diagram
graph TD
2577417462["charts.XYSeriesMixin"]
3518910106["charts.AbstractSeriesMixin"]
3227531497["core.ObjectMixin"]
2751680898["builtins.object"]
3518910106 --> 2577417462
3227531497 --> 3518910106
2751680898 --> 3227531497
2751680898 --> 3518910106
2751680898 --> 2577417462
🛈 DocStrings
Bases: AbstractSeriesMixin, _XYSeriesBase
Source code in prettyqt/charts/xyseries.py
| class XYSeriesMixin(charts.AbstractSeriesMixin, _XYSeriesBase):
def __setitem__(self, index: int, val: datatypes.PointFType):
"""Set point at given index to value."""
self.replace(index, datatypes.to_pointf(val))
def __delitem__(self, index: int):
"""Remove point with given index."""
self.remove(index)
# def __setstate__(self, state):
# self.append(state["points"])
# def __reduce__(self):
# return type(self), (), self.__getstate__()
def __add__(self, other: datatypes.PointFType) -> Self:
"""Append a point to the Series."""
self.append(datatypes.to_pointf(other))
return self
def get_points(self) -> list[core.QPointF]:
if prettyqt.qt.API == "pyqt6":
return [self.at(i) for i in range(self.count())]
return self.points()
def get_pen(self) -> gui.Pen:
return gui.Pen(self.pen())
def get_brush(self) -> gui.Brush:
return gui.Brush(self.brush())
|
__add__(other: datatypes.PointFType) -> Self
Append a point to the Series.
Source code in prettyqt/charts/xyseries.py
| def __add__(self, other: datatypes.PointFType) -> Self:
"""Append a point to the Series."""
self.append(datatypes.to_pointf(other))
return self
|
__delitem__(index: int)
Remove point with given index.
Source code in prettyqt/charts/xyseries.py
| def __delitem__(self, index: int):
"""Remove point with given index."""
self.remove(index)
|
__setitem__(index: int, val: datatypes.PointFType)
Set point at given index to value.
Source code in prettyqt/charts/xyseries.py
| def __setitem__(self, index: int, val: datatypes.PointFType):
"""Set point at given index to value."""
self.replace(index, datatypes.to_pointf(val))
|
:fa-brands-github: Show source on GitHub