Astra GateEnglish

Gauge

v2 插件界面组件 Gauge(图表)的属性、子节点与示例

分组:图表 · 子节点:不接受子节点

属性

属性类型
value数字
max数字
label文本
thresholdsJSON

另有所有组件都有的通用属性。动作类型的属性写动作名,或 { action, args }。

示例

组件画廊和两端比对用的就是这棵树:

代码json
{
  "type": "Gauge",
  "props": {
    "value": 72,
    "max": 100,
    "label": "Budget used",
    "thresholds": [
      {
        "at": 60,
        "tone": "warning"
      },
      {
        "at": 90,
        "tone": "danger"
      }
    ]
  }
}