Follow ______ on twitter.

6.2.5 Continuous Monitoring and Review

Code

Vega-Lite Chart

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "A simple bar chart with embedded data.",
  "data": {
    "values": [
      {
        "KRI": "KRI1",
        "value": 70
      },
      {
        "KRI": "KRI2",
        "value": 85
      },
      {
        "KRI": "KRI3",
        "value": 60
      },
      {
        "KRI": "KRI4",
        "value": 90
      }
    ]
  },
  "layer": [
    {
      "mark": {
        "type": "bar",
        "width": 80
      },
      "encoding": {
        "x": {
          "field": "KRI",
          "type": "nominal",
          "axis": {
            "labelAngle": 0
          },
          "scale": {
            "paddingInner": 1,
            "paddingOuter": 15
          }
        },
        "y": {
          "field": "value",
          "type": "quantitative"
        },
        "color": {
          "condition": {
            "test": "datum.value > 80",
            "value": "#FF000066"
          },
          "value": "#00497666"
        }
      }
    },
    {
      "mark": {
        "type": "rule",
        "color": "red",
        "size": 1
      },
      "encoding": {
        "y": {
          "datum": 80
        }
      }
    },
    {
      "mark": {
        "type": "text",
        "align": "center",
        "dy": -5,
        "fontWeight": "bold",
        "color": "red"
      },
      "encoding": {
        "x": {
          "field": "KRI",
          "type": "nominal"
        },
        "y": {
          "field": "value",
          "type": "quantitative"
        },
        "text": {
          "condition": {
            "test": "datum.value > 80",
            "value": "Breach"
          }
        }
      }
    }
  ]
}