{
  "id": "device-gauge",
  "title": "压力表",
  "type": "custom-svg",
  "thumbnail": "",
  "width": 90,
  "height": 90,
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n  <defs>\n    <radialGradient id=\"dial\" cx=\"0.5\" cy=\"0.5\" r=\"0.5\">\n      <stop offset=\"0\" stop-color=\"#0f2c48\"/><stop offset=\"1\" stop-color=\"#061424\"/>\n    </radialGradient>\n    <filter id=\"glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\"><feGaussianBlur stdDeviation=\"2\" result=\"b\"/><feMerge><feMergeNode in=\"b\"/><feMergeNode in=\"SourceGraphic\"/></feMerge></filter>\n  </defs>\n  <circle cx=\"50\" cy=\"50\" r=\"48\" fill=\"url(#dial)\" stroke=\"#1f5d86\" stroke-width=\"2\"/>\n  <circle cx=\"50\" cy=\"50\" r=\"36\" fill=\"none\" stroke=\"#17324b\" stroke-width=\"7\" stroke-linecap=\"round\" stroke-dasharray=\"169.65 1000\" transform=\"rotate(135 50 50)\"/>\n  <circle id=\"arc\" cx=\"50\" cy=\"50\" r=\"36\" fill=\"none\" stroke=\"#00e5ff\" stroke-width=\"7\" stroke-linecap=\"round\" stroke-dasharray=\"80 1000\" transform=\"rotate(135 50 50)\" filter=\"url(#glow)\"/>\n  <text id=\"value\" x=\"50\" y=\"54\" text-anchor=\"middle\" font-size=\"17\" font-family=\"Arial\" font-weight=\"bold\" fill=\"#e6fbff\" filter=\"url(#glow)\">0.00</text>\n  <text x=\"50\" y=\"68\" text-anchor=\"middle\" font-size=\"8\" font-family=\"Arial\" fill=\"#6fa8c8\">MPa</text>\n  <text x=\"27\" y=\"86\" text-anchor=\"middle\" font-size=\"7\" font-family=\"Arial\" fill=\"#4f7d99\">0</text>\n  <text x=\"73\" y=\"86\" text-anchor=\"middle\" font-size=\"7\" font-family=\"Arial\" fill=\"#4f7d99\">1.0</text>\n</svg>",
  "props": {
    "value": {
      "title": "压力(MPa)",
      "type": "number",
      "val": 0.4,
      "min": 0,
      "max": 1,
      "step": 0.01
    }
  },
  "bindings": [
    {
      "selector": "#arc",
      "attr": "stroke-dasharray",
      "prop": "value",
      "expr": "clamp(v, 0, 1) * 169.65",
      "template": "{v} 1000"
    },
    {
      "selector": "#arc",
      "attr": "stroke",
      "prop": "value",
      "map": [
        {
          "operator": ">=",
          "value": 0.6,
          "result": "#ff1744"
        },
        {
          "operator": ">=",
          "value": 0.5,
          "result": "#ffab00"
        },
        {
          "operator": "<",
          "value": 0.5,
          "result": "#00e5ff"
        }
      ]
    },
    {
      "selector": "#value",
      "attr": "$text",
      "prop": "value",
      "expr": "round(v * 100) / 100"
    }
  ]
}
