Chart

A data visualization component for rendering various chart types including bar, line, and donut charts.

组件展示

Chart 1
Chart 2
Chart 3
Chart 4

属性

属性名
类型
必需性
描述
id*
ComponentId
必需
暂无描述
accessibility
AccessibilityAttributes
可选
暂无描述
styles
Styles
可选
Component style properties
weight
number
可选
The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column.
component*
"Chart"
必需
暂无描述
chartType*
"bar" | "line" | "donut" | "bar_grouped"
必需
The type of chart to display. Supports bar chart, line chart, donut chart, and grouped bar chart.
可选值: bar, line, donut, bar_grouped
data*
object
必需
Chart data configuration. The data structure varies depending on the chart type.

代码示例

{
  "component": "Chart",
  "id": "chart_1",
  "chartType": null,
  "data": {}
}