QCandlestickSeries¶
The QCandlestickSeries
class presents data as candlesticks. More…
Synopsis¶
Functions¶
def
append
(set)def
append
(sets)def
bodyOutlineVisible
()def
bodyWidth
()def
brush
()def
capsVisible
()def
capsWidth
()def
clear
()def
count
()def
decreasingColor
()def
increasingColor
()def
insert
(index, set)def
maximumColumnWidth
()def
minimumColumnWidth
()def
pen
()def
remove
(set)def
remove
(sets)def
setBodyOutlineVisible
(bodyOutlineVisible)def
setBodyWidth
(bodyWidth)def
setBrush
(brush)def
setCapsVisible
(capsVisible)def
setCapsWidth
(capsWidth)def
setDecreasingColor
(decreasingColor)def
setIncreasingColor
(increasingColor)def
setMaximumColumnWidth
(maximumColumnWidth)def
setMinimumColumnWidth
(minimumColumnWidth)def
setPen
(pen)def
sets
()def
take
(set)
Signals¶
def
bodyOutlineVisibilityChanged
()def
bodyWidthChanged
()def
brushChanged
()def
candlestickSetsAdded
(sets)def
candlestickSetsRemoved
(sets)def
capsVisibilityChanged
()def
capsWidthChanged
()def
clicked
(set)def
countChanged
()def
decreasingColorChanged
()def
doubleClicked
(set)def
hovered
(status, set)def
increasingColorChanged
()def
maximumColumnWidthChanged
()def
minimumColumnWidthChanged
()def
penChanged
()def
pressed
(set)def
released
(set)
Detailed Description¶
This class acts as a container for single candlestick items. Each item is drawn to its own category when using QBarCategoryAxis
. QDateTimeAxis
and QValueAxis
can be used as alternatives to QBarCategoryAxis
. In this case, each candlestick item is drawn according to its timestamp value.
Note
The timestamps must be unique within a QCandlestickSeries
. When using QBarCategoryAxis
, only the first one of the candlestick items sharing a timestamp is drawn. If the chart includes multiple instances of QCandlestickSeries
, items from different series sharing a timestamp are drawn to the same category. When using QValueAxis
or QDateTimeAxis
, candlestick items sharing a timestamp will overlap each other.
See the candlestick chart example to learn how to create a candlestick chart.
- class PySide6.QtCharts.QCandlestickSeries([parent=None])¶
- Parameters
parent –
PySide6.QtCore.QObject
Constructs an empty QCandlestickSeries
. The parent
is optional.
- PySide6.QtCharts.QCandlestickSeries.append(set)¶
- Parameters
- Return type
bool
Adds a single candlestick item specified by set
to the series and takes ownership of it. If the item is null or it is already in the series, it is not appended. Returns true
if appending succeeded, false
otherwise.
- PySide6.QtCharts.QCandlestickSeries.append(sets)
- Parameters
sets –
- Return type
bool
- PySide6.QtCharts.QCandlestickSeries.bodyOutlineVisibilityChanged()¶
- PySide6.QtCharts.QCandlestickSeries.bodyOutlineVisible()¶
- Return type
bool
This property holds The visibility of the candlestick body outline..
- PySide6.QtCharts.QCandlestickSeries.bodyWidth()¶
- Return type
float
This property holds The relative width of the candlestick item within its own slot, in the range from 0.0 to 1.0..
Values outside this range are clamped to 0.0 or 1.0.
- PySide6.QtCharts.QCandlestickSeries.bodyWidthChanged()¶
- PySide6.QtCharts.QCandlestickSeries.brush()¶
- Return type
This property holds The brush used to fill the candlestick items..
- PySide6.QtCharts.QCandlestickSeries.brushChanged()¶
- PySide6.QtCharts.QCandlestickSeries.candlestickSetsAdded(sets)¶
- Parameters
sets –
- PySide6.QtCharts.QCandlestickSeries.candlestickSetsRemoved(sets)¶
- Parameters
sets –
- PySide6.QtCharts.QCandlestickSeries.capsVisibilityChanged()¶
- PySide6.QtCharts.QCandlestickSeries.capsVisible()¶
- Return type
bool
This property holds The visibility of the caps..
- PySide6.QtCharts.QCandlestickSeries.capsWidth()¶
- Return type
float
This property holds The relative width of the caps within a candlestick, in the range from 0.0 to 1.0..
Values outside this range are clamped to 0.0 or 1.0.
- PySide6.QtCharts.QCandlestickSeries.capsWidthChanged()¶
- PySide6.QtCharts.QCandlestickSeries.clear()¶
Removes all candlestick items from the series and permanently deletes them.
- PySide6.QtCharts.QCandlestickSeries.clicked(set)¶
- Parameters
- PySide6.QtCharts.QCandlestickSeries.count()¶
- Return type
int
This property holds The number of candlestick items in a series..
- PySide6.QtCharts.QCandlestickSeries.countChanged()¶
- PySide6.QtCharts.QCandlestickSeries.decreasingColor()¶
- Return type
This property holds The color of the decreasing candlestick item body..
A candlestick is decreasing when its open value is higher than the close value. By default, this property is set to the brush color with the alpha channel set to 128. The default color is used also when the property is set to an invalid color value.
- PySide6.QtCharts.QCandlestickSeries.decreasingColorChanged()¶
- PySide6.QtCharts.QCandlestickSeries.doubleClicked(set)¶
- Parameters
- PySide6.QtCharts.QCandlestickSeries.hovered(status, set)¶
- Parameters
status – bool
- PySide6.QtCharts.QCandlestickSeries.increasingColor()¶
- Return type
This property holds The color of the increasing candlestick item body..
A candlestick is increasing when its close value is higher than the open value. By default, this property is set to the brush color. The default color is used also when the property is set to an invalid color value.
- PySide6.QtCharts.QCandlestickSeries.increasingColorChanged()¶
- PySide6.QtCharts.QCandlestickSeries.insert(index, set)¶
- Parameters
index – int
- Return type
bool
Inserts the candlestick item specified by set
to the series at the position specified by index
. Takes ownership of the item. If the item is null or already belongs to the series, it is not inserted. Returns true
if inserting succeeded, false
otherwise.
- PySide6.QtCharts.QCandlestickSeries.maximumColumnWidth()¶
- Return type
float
This property holds The maximum width of the candlestick items in pixels. Setting a negative value means there is no maximum width. All negative values are converted to -1.0..
- PySide6.QtCharts.QCandlestickSeries.maximumColumnWidthChanged()¶
- PySide6.QtCharts.QCandlestickSeries.minimumColumnWidth()¶
- Return type
float
This property holds The minimum width of the candlestick items in pixels. Setting a negative value means there is no minimum width. All negative values are converted to -1.0..
- PySide6.QtCharts.QCandlestickSeries.minimumColumnWidthChanged()¶
- PySide6.QtCharts.QCandlestickSeries.pen()¶
- Return type
This property holds The pen used to draw the lines of the candlestick items..
- PySide6.QtCharts.QCandlestickSeries.penChanged()¶
- PySide6.QtCharts.QCandlestickSeries.pressed(set)¶
- Parameters
- PySide6.QtCharts.QCandlestickSeries.released(set)¶
- Parameters
- PySide6.QtCharts.QCandlestickSeries.remove(set)¶
- Parameters
- Return type
bool
Removes a single candlestick item, specified by set
, from the series. Returns true
if the item is successfully deleted, false
otherwise.
- PySide6.QtCharts.QCandlestickSeries.remove(sets)
- Parameters
sets –
- Return type
bool
- PySide6.QtCharts.QCandlestickSeries.setBodyOutlineVisible(bodyOutlineVisible)¶
- Parameters
bodyOutlineVisible – bool
This property holds The visibility of the candlestick body outline..
- PySide6.QtCharts.QCandlestickSeries.setBodyWidth(bodyWidth)¶
- Parameters
bodyWidth – float
This property holds The relative width of the candlestick item within its own slot, in the range from 0.0 to 1.0..
Values outside this range are clamped to 0.0 or 1.0.
- PySide6.QtCharts.QCandlestickSeries.setBrush(brush)¶
- Parameters
brush –
PySide6.QtGui.QBrush
This property holds The brush used to fill the candlestick items..
- PySide6.QtCharts.QCandlestickSeries.setCapsVisible(capsVisible)¶
- Parameters
capsVisible – bool
This property holds The visibility of the caps..
- PySide6.QtCharts.QCandlestickSeries.setCapsWidth(capsWidth)¶
- Parameters
capsWidth – float
This property holds The relative width of the caps within a candlestick, in the range from 0.0 to 1.0..
Values outside this range are clamped to 0.0 or 1.0.
- PySide6.QtCharts.QCandlestickSeries.setDecreasingColor(decreasingColor)¶
- Parameters
decreasingColor –
PySide6.QtGui.QColor
This property holds The color of the decreasing candlestick item body..
A candlestick is decreasing when its open value is higher than the close value. By default, this property is set to the brush color with the alpha channel set to 128. The default color is used also when the property is set to an invalid color value.
- PySide6.QtCharts.QCandlestickSeries.setIncreasingColor(increasingColor)¶
- Parameters
increasingColor –
PySide6.QtGui.QColor
This property holds The color of the increasing candlestick item body..
A candlestick is increasing when its close value is higher than the open value. By default, this property is set to the brush color. The default color is used also when the property is set to an invalid color value.
- PySide6.QtCharts.QCandlestickSeries.setMaximumColumnWidth(maximumColumnWidth)¶
- Parameters
maximumColumnWidth – float
This property holds The maximum width of the candlestick items in pixels. Setting a negative value means there is no maximum width. All negative values are converted to -1.0..
- PySide6.QtCharts.QCandlestickSeries.setMinimumColumnWidth(minimumColumnWidth)¶
- Parameters
minimumColumnWidth – float
This property holds The minimum width of the candlestick items in pixels. Setting a negative value means there is no minimum width. All negative values are converted to -1.0..
- PySide6.QtCharts.QCandlestickSeries.setPen(pen)¶
- Parameters
pen –
PySide6.QtGui.QPen
This property holds The pen used to draw the lines of the candlestick items..
- PySide6.QtCharts.QCandlestickSeries.sets()¶
- Return type
Returns the list of candlestick items in the series. Ownership of the items does not change.
- PySide6.QtCharts.QCandlestickSeries.take(set)¶
- Parameters
- Return type
bool
Takes a single candlestick item, specified by set
, from the series. Does not delete the item. Returns true
if the take operation was successful, false
otherwise.
Note
The series remains the item’s parent object. You must set the parent object to take full ownership.
© 2022 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.