QCandlestickSeries#

The QCandlestickSeries class presents data as candlesticks. More

Inheritance diagram of PySide6.QtCharts.QCandlestickSeries

Synopsis#

Properties#

  • bodyOutlineVisible - Visibility of the candlestick body outline

  • bodyWidth - Relative width of the candlestick item within its own slot, in the range from 0.0 to 1.0

  • brush - Used to fill the candlestick items

  • capsVisible - Visibility of the caps

  • capsWidth - Relative width of the caps within a candlestick, in the range from 0.0 to 1.0

  • count - Number of candlestick items in a series

  • decreasingColor - Color of the decreasing candlestick item body

  • increasingColor - Color of the increasing candlestick item body

  • maximumColumnWidth - 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

  • minimumColumnWidth - 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

  • pen - Used to draw the lines of the candlestick items

Functions#

Signals#

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#

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:

parentPySide6.QtCore.QObject

Constructs an empty QCandlestickSeries . The parent is optional.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property PᅟySide6.QtCharts.QCandlestickSeries.bodyOutlineVisible: bool#

This property holds The visibility of the candlestick body outline..

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.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.

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.brush: PySide6.QtGui.QBrush#

This property holds The brush used to fill the candlestick items..

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.capsVisible: bool#

This property holds The visibility of the caps..

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.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.

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.count: int#

This property holds The number of candlestick items in a series..

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.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.

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.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.

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.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..

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.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..

Access functions:
property PᅟySide6.QtCharts.QCandlestickSeries.pen: PySide6.QtGui.QPen#

This property holds The pen used to draw the lines of the candlestick items..

Access functions:
PySide6.QtCharts.QCandlestickSeries.append(sets)#
Parameters:

sets

Return type:

bool

Adds a list of candlestick items specified by sets to the series and takes ownership of it. If any of the items are null, already belong to the series, or appear in the list more than once, nothing is appended. Returns true if all items were appended successfully, false otherwise.

PySide6.QtCharts.QCandlestickSeries.append(set)
Parameters:

setPySide6.QtCharts.QCandlestickSet

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.bodyOutlineVisibilityChanged()#

This signal is emitted when the visibility of the candlestick item body outline changes.

Notification signal of property bodyOutlineVisible .

PySide6.QtCharts.QCandlestickSeries.bodyOutlineVisible()#
Return type:

bool

Getter of property bodyOutlineVisible .

PySide6.QtCharts.QCandlestickSeries.bodyWidth()#
Return type:

float

See also

setBodyWidth()

Getter of property bodyWidth .

PySide6.QtCharts.QCandlestickSeries.bodyWidthChanged()#

This signal is emitted when the candlestick item width changes.

See also

bodyWidth

Notification signal of property bodyWidth .

PySide6.QtCharts.QCandlestickSeries.brush()#
Return type:

PySide6.QtGui.QBrush

See also

setBrush()

Getter of property brush .

PySide6.QtCharts.QCandlestickSeries.brushChanged()#

This signal is emitted when the candlestick item brush changes.

See also

brush

Notification signal of property brush .

PySide6.QtCharts.QCandlestickSeries.candlestickSetsAdded(sets)#
Parameters:

sets

This signal is emitted when the candlestick items specified by sets are added to the series.

PySide6.QtCharts.QCandlestickSeries.candlestickSetsRemoved(sets)#
Parameters:

sets

This signal is emitted when the candlestick items specified by sets are removed from the series.

PySide6.QtCharts.QCandlestickSeries.capsVisibilityChanged()#

This signal is emitted when the visibility of the candlestick item caps changes.

See also

capsVisible

Notification signal of property capsVisible .

PySide6.QtCharts.QCandlestickSeries.capsVisible()#
Return type:

bool

See also

setCapsVisible()

Getter of property capsVisible .

PySide6.QtCharts.QCandlestickSeries.capsWidth()#
Return type:

float

See also

setCapsWidth()

Getter of property capsWidth .

PySide6.QtCharts.QCandlestickSeries.capsWidthChanged()#

This signal is emitted when the candlestick item caps width changes.

See also

capsWidth

Notification signal of property capsWidth .

PySide6.QtCharts.QCandlestickSeries.clear()#

Removes all candlestick items from the series and permanently deletes them.

PySide6.QtCharts.QCandlestickSeries.clicked(set)#
Parameters:

setPySide6.QtCharts.QCandlestickSet

This signal is emitted when the candlestick item specified by set is clicked on the chart.

PySide6.QtCharts.QCandlestickSeries.count()#
Return type:

int

Returns the number of the candlestick items in the series.

Getter of property count .

PySide6.QtCharts.QCandlestickSeries.countChanged()#

This signal is emitted when the number of candlestick items in the series changes.

See also

count

Notification signal of property count .

PySide6.QtCharts.QCandlestickSeries.decreasingColor()#
Return type:

PySide6.QtGui.QColor

Getter of property decreasingColor .

PySide6.QtCharts.QCandlestickSeries.decreasingColorChanged()#

This signal is emitted when the candlestick item decreasing color changes.

See also

decreasingColor

Notification signal of property decreasingColor .

PySide6.QtCharts.QCandlestickSeries.doubleClicked(set)#
Parameters:

setPySide6.QtCharts.QCandlestickSet

This signal is emitted when the candlestick item specified by set is double-clicked on the chart.

PySide6.QtCharts.QCandlestickSeries.hovered(status, set)#
Parameters:

This signal is emitted when a mouse is hovered over the candlestick item specified by set in a chart.

When the mouse moves over the item, status turns true, and when the mouse moves away again, it turns false.

PySide6.QtCharts.QCandlestickSeries.increasingColor()#
Return type:

PySide6.QtGui.QColor

Getter of property increasingColor .

PySide6.QtCharts.QCandlestickSeries.increasingColorChanged()#

This signal is emitted when the candlestick item increasing color changes.

See also

increasingColor

Notification signal of property increasingColor .

PySide6.QtCharts.QCandlestickSeries.insert(index, set)#
Parameters:
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

Getter of property maximumColumnWidth .

PySide6.QtCharts.QCandlestickSeries.maximumColumnWidthChanged()#

This signal is emitted when there is a change in the maximum column width of candlestick items.

Notification signal of property maximumColumnWidth .

PySide6.QtCharts.QCandlestickSeries.minimumColumnWidth()#
Return type:

float

Getter of property minimumColumnWidth .

PySide6.QtCharts.QCandlestickSeries.minimumColumnWidthChanged()#

This signal is emitted when there is a change in the minimum column width of candlestick items.

Notification signal of property minimumColumnWidth .

PySide6.QtCharts.QCandlestickSeries.pen()#
Return type:

PySide6.QtGui.QPen

See also

setPen()

Getter of property pen .

PySide6.QtCharts.QCandlestickSeries.penChanged()#

This signal is emitted when the candlestick item pen changes.

See also

pen

Notification signal of property pen .

PySide6.QtCharts.QCandlestickSeries.pressed(set)#
Parameters:

setPySide6.QtCharts.QCandlestickSet

This signal is emitted when the user clicks the candlestick item specified by set and holds down the mouse button.

PySide6.QtCharts.QCandlestickSeries.released(set)#
Parameters:

setPySide6.QtCharts.QCandlestickSet

This signal is emitted when the user releases the mouse press on the candlestick item specified by set.

PySide6.QtCharts.QCandlestickSeries.remove(set)#
Parameters:

setPySide6.QtCharts.QCandlestickSet

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

Removes a list of candlestick items specified by sets from the series. If any of the items are null, were already removed from the series, or appear in the list more than once, nothing is removed. Returns true if all items were removed successfully, false otherwise.

PySide6.QtCharts.QCandlestickSeries.setBodyOutlineVisible(bodyOutlineVisible)#
Parameters:

bodyOutlineVisible – bool

Setter of property bodyOutlineVisible .

PySide6.QtCharts.QCandlestickSeries.setBodyWidth(bodyWidth)#
Parameters:

bodyWidth – float

See also

bodyWidth()

Setter of property bodyWidth .

PySide6.QtCharts.QCandlestickSeries.setBrush(brush)#
Parameters:

brushPySide6.QtGui.QBrush

See also

brush()

Setter of property brush .

PySide6.QtCharts.QCandlestickSeries.setCapsVisible(capsVisible)#
Parameters:

capsVisible – bool

See also

capsVisible()

Setter of property capsVisible .

PySide6.QtCharts.QCandlestickSeries.setCapsWidth(capsWidth)#
Parameters:

capsWidth – float

See also

capsWidth()

Setter of property capsWidth .

PySide6.QtCharts.QCandlestickSeries.setDecreasingColor(decreasingColor)#
Parameters:

decreasingColorPySide6.QtGui.QColor

Setter of property decreasingColor .

PySide6.QtCharts.QCandlestickSeries.setIncreasingColor(increasingColor)#
Parameters:

increasingColorPySide6.QtGui.QColor

Setter of property increasingColor .

PySide6.QtCharts.QCandlestickSeries.setMaximumColumnWidth(maximumColumnWidth)#
Parameters:

maximumColumnWidth – float

Setter of property maximumColumnWidth .

PySide6.QtCharts.QCandlestickSeries.setMinimumColumnWidth(minimumColumnWidth)#
Parameters:

minimumColumnWidth – float

Setter of property minimumColumnWidth .

PySide6.QtCharts.QCandlestickSeries.setPen(pen)#
Parameters:

penPySide6.QtGui.QPen

See also

pen()

Setter of property pen .

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:

setPySide6.QtCharts.QCandlestickSet

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.