Basic Gauge

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
SCRIPT({
    value = 55;
    $.yield({
      tooltip: { formatter: "{a} <br/>{b} : {c}%" },
      series: [
        {
          name: "Pressure",
          type: "gauge",
          detail: { formatter: "{value}" },
          data: [
              { value: value, name: "PRESSURE" }
          ]
        }
      ]
    })
})
CHART()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
FAKE(linspace(55, 60, 1))
CHART(
    chartOption({
        tooltip: { formatter: "{a} <br/>{b} : {c}%" },
        series: [
          {
            name: "Pressure",
            type: "gauge",
            detail: { formatter: "{value}" },
            data: [
                { value: column(0)[0], name: "PRESSURE" }
            ]
          }
        ]
    })
)
Last updated on