EChart 图表
示例与代码
图表
属性
属性说明取值与默认值
colorQColor自定义颜色;透明值通常表示使用当前主题或语义配色。
默认值
动态绑定enabledbool是否允许交互;false 时控件禁用。
默认值
truegridColorQColor图表网格线颜色。
默认值
动态绑定heightreal组件尺寸,单位为像素;可绑定父布局尺寸。
默认值
implicitHeightmodelQVariantList数值数组或图表数据对象数组。
字段:
label, value
默认值
[]textColorQColor文字颜色。
默认值
动态绑定typeint图表的绘制类型。
ChartRenderer.Line = 0ChartRenderer.Bar = 1ChartRenderer.Area = 2
默认值
0 (Line)visiblebool是否显示组件。
默认值
truewidthreal组件尺寸,单位为像素;可绑定父布局尺寸。
默认值
implicitWidth