Bar3DSeries QML Type

用三维条形图表示数据序列。更多

Import Statement: import QtGraphs
In C++: QBar3DSeries
Inherits:

Abstract3DSeries

属性

信号

方法

详细说明

该类型管理系列特定的可视化元素以及系列数据(通过数据代理)。

Bar3DSeries 支持 itemLabelFormat 的以下格式标记:

@rowTitle来自行轴的标题
@colTitle列轴标题
@valueTitle来自值轴的标题
@rowIdx可见行索引。使用图形本地化。
@colIdx可见列索引。使用图形本地化。
@rowLabel行轴标签
@colLabel列轴标签
@valueLabel使用附加到图表的值坐标轴格式的项目值。更多信息,请参阅labelFormat
@seriesName系列名称
%< 格式说明以指定格式显示的项目值。格式规则与labelFormat 相同。

有关更完整的说明,请参阅QBar3DSeries

另请参阅 Qt Graphs 3D 数据处理

属性文档

baseColor : color

设置系列的基色。

另请参阅 colorStyleGraphsTheme.seriesColors


baseGradient : Gradient

设置序列的基本梯度。

另请参阅 colorStyle 和 GraphsTheme.seriesGradients。


colorStyle : GraphsTheme.ColorStyle

设置系列的颜色样式。

另请参阅 GraphsTheme.ColorStyle


columnLabels : list

数组的可选列标签。数组中的索引与行中的列索引相匹配。如果列表比最长行短,则所有列都不会获得标签。


dataArray : BarDataArray

持有数据数组的引用。

dataArrayChanged 设置数据数组时会发出信号,除非 与前一个数组相同。newDataArray

注意: 在对 dataArray 做任何操作之前,必须为相关代理创建一个系列。


dataProxy : BarDataProxy

活动数据代理。该系列拥有任何设置给它的代理的所有权,并在添加新代理时删除任何先前设置的代理。代理不能为空或设置为其他系列。


invalidSelectionPosition : point [read-only]

常量属性提供了一个无效的选择位置。该位置将分配给selectedBar 属性,以清除该系列中的选择。

另请参阅 GraphsItem3D.clearSelection()。


itemLabel : string [read-only]

格式化的项目标签。如果没有选中项或选中项不可见,则返回空字符串。

另请参阅 itemLabelFormat


itemLabelFormat : string

该系列中数据项的标签格式。该格式用于单个项目标签,例如,当一个项目被选中时。如何解释格式取决于系列类型。

另请参阅 Bar3DSeries,Scatter3DSeries, 和Surface3DSeries


itemLabelVisible : bool

如果true ,项目标签在图表中将绘制为浮动标签。否则不绘制项目标签。要在外部控件中显示项目标签,应将此属性设置为false 。默认值为true

另请参阅 itemLabelFormatitemLabel


mesh : Abstract3DSeries.Mesh

设置系列中项目的网格,如果是Surface3DSeries ,则设置选择指针。如果网格是Abstract3DSeries.Mesh.UserDefined ,则必须同时设置userDefinedMesh 属性,项目才能正确呈现。默认值取决于图形类型。

另请参阅 QAbstract3DSeries::Mesh


meshAngle : real

以度为单位定义系列旋转角度的便利属性。

注意: 读取该属性时,将使用浮点精度从Abstract3DSeries.meshRotation 值计算,并始终返回 0 至 360 度的值。

另请参阅 Abstract3DSeries.meshRotation


meshRotation : quaternion

设置应用于系列中所有项的网格旋转角度。旋转应为归一化四元数。Bar3DSeries 会忽略任何非绕 Y 轴的旋转。Surface3DSeries 只对选择指针应用旋转。默认为不旋转。


meshSmooth : bool

如果true ,则会使用通过mesh 属性设置的预定义网格的平滑版本。当网格设置为Abstract3DSeries.Mesh.UserDefined 时,此属性不会影响使用的自定义网格。默认为false


multiHighlightColor : color

设置系列的多项目高亮颜色。

另请参阅 colorStyleGraphsTheme.multiHighlightColor


multiHighlightGradient : Gradient

设置系列的多条目高亮渐变色。

另请参阅 colorStyleGraphsTheme.multiHighlightGradient


name : string

系列名称。可通过标签@seriesName 以项目标签格式使用。

另请参阅 itemLabelFormat


rowColors : list<Color>

该属性可用于以不同颜色绘制系列行。GraphsTheme.colorStyle 必须设置为Uniform 才能使用该属性。

注意: 如果设置了该属性并更改了主题,行颜色列表不会自动清除。

另请参阅 QGraphsTheme::ColorStyle::Uniform


rowLabels : list

数组的可选行标签。该数组中的索引与数据数组中的行索引相匹配。如果列表短于行数,则所有行都不会获得标签。


selectedBar : point

被选中的条形图。

所选条形图的位置指定为系列数据数组中的行和列。

一次只能选择一个条形图。

要从该系列中清除选择,请将invalidSelectionPosition 指定为位置。

如果将此系列添加到图表中,图表会根据用户交互或当选择无效时调整选择。选择另一个已添加系列上的条形图也会清除选择。

在所选条形图行之前从系列中移除行或插入行都会调整选择,使同一条形图保持被选中的状态。

另请参阅 GraphsItem3D.clearSelection()。


singleHighlightColor : color

设置系列的单项高亮颜色。

另请参阅 colorStyleGraphsTheme.singleHighlightColor


singleHighlightGradient : Gradient

设置系列的单项高亮渐变色。

另请参阅 colorStyleGraphsTheme.singleHighlightGradient


type : Abstract3DSeries.SeriesType [read-only]

系列的类型。QAbstract3DSeries::SeriesType 值之一。


userDefinedMesh : string

设置用户自定义网格的文件名,当meshAbstract3DSeries.Mesh.UserDefined 时,将使用该文件名。

注: 文件必须是QtQuick3D 网格格式。使用balsam 转换工具从其他 3D 模型格式创建网格。


visible : bool

设置系列的可见性。如果false ,则不会渲染序列。


信号文档

baseColorChanged(color color)

baseColor 更改为color 时会发出此信号。

注: 相应的处理程序是onBaseColorChanged


baseGradientChanged(Gradient gradient)

baseGradient 更改为gradient 时,将发出此信号。

注: 相应的处理程序是onBaseGradientChanged


colorStyleChanged(GraphsTheme.ColorStyle style)

colorStyle 变更为style 时,发出该信号。

注: 相应的处理程序是onColorStyleChanged


columnLabelsChanged()

列标签更改时发出此信号。

注: 相应的处理程序是onColumnLabelsChanged


dataArrayChanged(BarDataArray array)

dataArray 更改为array 时会发出该信号。

注: 相应的处理程序是onDataArrayChanged


dataProxyChanged(BarDataProxy proxy)

dataProxy 更改为proxy 时,将发出此信号。

注: 相应的处理程序是onDataProxyChanged


itemLabelChanged(string label)

itemLabel 变更为label 时,发出此信号。

注: 相应的处理程序是onItemLabelChanged


itemLabelFormatChanged(string format)

itemLabelFormat 变更为format 时,发出此信号。

注: 相应的处理程序是onItemLabelFormatChanged


itemLabelVisibilityChanged(bool visible)

当 itemLabelVisibility 变更为visible 时,发出此信号。

注: 相应的处理程序是onItemLabelVisibilityChanged


meshAngleChanged(real angle)

meshAngle 变更为angle 时,发出此信号。

注: 相应的处理程序是onMeshAngleChanged


meshChanged(Abstract3DSeries.Mesh mesh)

mesh 变更为mesh 时,发出该信号。

注: 相应的处理程序是onMeshChanged


meshRotationChanged(quaternion rotation)

meshRotation 变更为rotation 时,发出此信号。

注: 相应的处理程序是onMeshRotationChanged


meshSmoothChanged(bool enabled)

meshSmooth 变更为enabled 时,发出此信号。

注: 相应的处理程序是onMeshSmoothChanged


multiHighlightColorChanged(color color)

multiHighlightColor 变更为color 时,发出此信号。

注: 相应的处理程序是onMultiHighlightColorChanged


multiHighlightGradientChanged(Gradient gradient)

multiHighlightGradient 变更为gradient 时会发出该信号。

注: 相应的处理程序是onMultiHighlightGradientChanged


nameChanged(string name)

name 变更为name 时,发出该信号。

注: 相应的处理程序是onNameChanged


rowColorsChanged(list<color> rowcolors)

rowColors 变更为rowcolors 时,发出该信号。

注: 相应的处理程序是onRowColorsChanged


rowLabelsChanged()

行标签更改时发出此信号。

注: 相应的处理程序是onRowLabelsChanged


selectedBarChanged(point position)

selectedBar 更改为position 时,将发出此信号。

注: 相应的处理程序是onSelectedBarChanged


singleHighlightColorChanged(color color)

singleHighlightColor 更改为color 时,将发出此信号。

注: 相应的处理程序是onSingleHighlightColorChanged


singleHighlightGradientChanged(Gradient gradient)

singleHighlightGradient 变更为gradient 时,发出该信号。

注: 相应的处理程序是onSingleHighlightGradientChanged


userDefinedMeshChanged(string fileName)

userDefinedMesh 变更为fileName 时,发出该信号。

注: 相应的处理程序是onUserDefinedMeshChanged


visibilityChanged(bool visible)

当系列可见性更改为visible 时,发出此信号。

注: 相应的处理程序是onVisibilityChanged


方法文档

void setMeshAxisAndAngle(vector3d axis, real angle)

方便函数,用于从axisangle 构建网格旋转四元数。

另请参阅 meshRotation


© 2025 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.