- class QBar3DSeries¶
The
QBar3DSeries
class represents a data series in a 3D bar graph. More…Synopsis¶
Properties¶
columnLabelsᅟ
- Optional column labels for the arraydataArrayᅟ
- Data array for the seriesdataProxyᅟ
- Active data proxymeshAngleᅟ
- Series rotation angle in degreesrowColorsᅟ
- List of row colors in the seriesrowLabelsᅟ
- Optional row labels for the arrayselectedBarᅟ
- Bar in the series that is selected
Methods¶
def
__init__()
def
clearArray()
def
clearRow()
def
columnLabels()
def
dataArray()
def
dataProxy()
def
meshAngle()
def
rowColors()
def
rowLabels()
def
selectedBar()
def
setDataArray()
def
setDataProxy()
def
setMeshAngle()
def
setRowColors()
def
setRowLabels()
def
setSelectedBar()
Signals¶
Static functions¶
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¶
Warning
This section contains snippets that were automatically translated from C++ to Python and may contain errors.
This class manages the series specific visual elements, as well as the series data (via a data proxy).
Regarding the proxy-series relationship, it is crucial to highlight a couple of key points. In this context, data is stored in series and users can access the dataset through the series. This series is controlled or represented by a proxy object. Thus, the proxy can be used to manage various operations on the data and update the actual dataset. However, it is necessary to create a series associated with this proxy to edit the dataset.
If no data proxy is set explicitly for the series, the series creates a default proxy. Setting another proxy will destroy the existing proxy and all data added to the series.
QBar3DSeries
supports the following format tags forsetItemLabelFormat()
:@rowTitle
Title from row axis
@colTitle
Title from column axis
@valueTitle
Title from value axis
@rowIdx
Visible row index. Localized using the graph locale.
@colIdx
Visible column index. Localized using the graph locale.
@rowLabel
Label from row axis
@colLabel
Label from column axis
@valueLabel
Item value formatted using the format of the value axis attached to the graph. For more information, see
labelFormat
.@seriesName
Name of the series
%<format spec>
Item value in the specified format. Formatted using the same rules as
labelFormat
.For example:
proxy.setItemLabelFormat("@valueTitle for (@rowLabel, @colLabel): %.1f")
See also
Qt Graphs Data Handling with 3D
locale
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property columnLabelsᅟ: list of strings¶
This property holds The optional column labels for the array..
Indexes in this array match column indexes in rows. If the list is shorter than the longest row, all columns will not get labels.
- Access functions:
- property dataArrayᅟ: list of list of QBarDataItem¶
This property holds Data array for the series..
Holds the reference of the data array.
dataArrayChanged signal is emitted when data array is set, unless
newDataArray
is identical to the previous one.Note
Before doing anything regarding the dataArray, a series must be created for the relevant proxy.
See also
clearRow(qsizetype rowIndex)
clearArray()
- Access functions:
- property dataProxyᅟ: QBarDataProxy¶
This property holds The active data proxy..
The series assumes ownership of any proxy set to it and deletes any previously set proxy when a new one is added. The proxy cannot be null or set to another series.
- Access functions:
- property meshAngleᅟ: float¶
This property holds The series rotation angle in degrees..
Setting this property is equivalent to the following call:
setMeshRotation(QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, angle))
Note
When reading this property, it is calculated from the
meshRotation
value using floating point precision and always returns a value from zero to 360 degrees.See also
- Access functions:
- property rowColorsᅟ: list of QColor¶
This property holds The list of row colors in the series..
This property can be used to color the rows of the series in different colors. The
ColorStyle
must be set toUniform
to use this property.See also
- Access functions:
- property rowLabelsᅟ: list of strings¶
This property holds The optional row labels for the array..
Indexes in this array match the row indexes in the data array. If the list is shorter than the number of rows, all rows will not get labels.
- Access functions:
This property holds The bar in the series that is selected..
- Access functions:
Constructs a bar 3D series with the parent
parent
.- __init__(dataProxy[, parent=None])
- Parameters:
dataProxy –
QBarDataProxy
parent –
QObject
Constructs a bar 3D series with the data proxy
dataProxy
and the parentparent
.- clearArray()¶
Clears the existing array.
- clearRow(rowIndex)¶
- Parameters:
rowIndex – int
Clears the existing row in the array according to given
rowIndex
.- columnLabels()¶
- Return type:
list of strings
See also
Getter of property
columnLabelsᅟ
.- columnLabelsChanged()¶
Notification signal of property
columnLabelsᅟ
.- dataArray()¶
- Return type:
.list of list of QBarDataItem
Getter of property
dataArrayᅟ
.- dataArrayChanged(array)¶
- Parameters:
array – .list of list of QBarDataItem
Notification signal of property
dataArrayᅟ
.- dataProxy()¶
- Return type:
See also
Getter of property
dataProxyᅟ
.- dataProxyChanged(proxy)¶
- Parameters:
proxy –
QBarDataProxy
Notification signal of property
dataProxyᅟ
.Returns an invalid position for selection. This position is set to the
selectedBar
property to clear the selection from this series.See also
- meshAngle()¶
- Return type:
float
See also
Getter of property
meshAngleᅟ
.- meshAngleChanged(angle)¶
- Parameters:
angle – float
Notification signal of property
meshAngleᅟ
.Getter of property
rowColorsᅟ
.- rowColorsChanged(rowcolors)¶
- Parameters:
rowcolors – .list of QColor
Notification signal of property
rowColorsᅟ
.- rowLabels()¶
- Return type:
list of strings
See also
Getter of property
rowLabelsᅟ
.- rowLabelsChanged()¶
Notification signal of property
rowLabelsᅟ
.- selectedBar()¶
- Return type:
See also
Getter of property
selectedBarᅟ
.Notification signal of property
selectedBarᅟ
.- setColumnLabels(labels)¶
- Parameters:
labels – list of strings
See also
Setter of property
columnLabelsᅟ
.- setDataArray(newDataArray)¶
- Parameters:
newDataArray – .list of list of QBarDataItem
See also
Setter of property
dataArrayᅟ
.- setDataProxy(proxy)¶
- Parameters:
proxy –
QBarDataProxy
See also
Setter of property
dataProxyᅟ
.- setMeshAngle(angle)¶
- Parameters:
angle – float
See also
Setter of property
meshAngleᅟ
.- setRowColors(colors)¶
- Parameters:
colors – .list of QColor
See also
Setter of property
rowColorsᅟ
.- setRowLabels(labels)¶
- Parameters:
labels – list of strings
See also
Setter of property
rowLabelsᅟ
.Selects the bar at the
position
position, specified as a row and column in the data array of the series.Only one bar can be selected at a time.
To clear the selection from this series,
invalidSelectionPosition()
is set asposition
.If this series is added to a graph, the graph can adjust the selection according to user interaction or if it becomes invalid. Selecting a bar on another added series will also clear the selection.
Removing rows from or inserting rows into the series before the row of the selected bar will adjust the selection so that the same bar will stay selected.
See also
Setter of property
selectedBarᅟ
.