{
  "title": {
    "text": "Score de conformité par section",
    "subtitle": "Tableau de bord Rudder, benchmark CIS RHEL 9"
  },
  "data": {
    "values": [
      {
        "section": "Section 1 : configuration initiale",
        "controle": "1.1 Systèmes de fichiers",
        "score": 87
      },
      {
        "section": "Section 1 : configuration initiale",
        "controle": "1.2 Mises à jour logicielles",
        "score": 100
      },
      {
        "section": "Section 1 : configuration initiale",
        "controle": "1.3 Intégrité des fichiers",
        "score": 92
      },
      {
        "section": "Section 5 : accès, authentification, autorisation",
        "controle": "5.1 Configuration de cron",
        "score": 100
      },
      {
        "section": "Section 5 : accès, authentification, autorisation",
        "controle": "5.2 Serveur SSH",
        "score": 78,
        "role": "accent"
      },
      {
        "section": "Section 5 : accès, authentification, autorisation",
        "controle": "5.3 Configuration de PAM",
        "score": 85
      }
    ]
  },
  "transform": [
    {
      "calculate": "datum.score + ' %'",
      "as": "etiquette"
    }
  ],
  "facet": {
    "row": {
      "field": "section",
      "type": "nominal",
      "title": null,
      "sort": null,
      "header": {
        "labelAngle": 0,
        "labelOrient": "top",
        "labelAnchor": "start",
        "labelAlign": "left"
      }
    }
  },
  "resolve": {
    "scale": {
      "y": "independent"
    }
  },
  "spec": {
    "width": 360,
    "encoding": {
      "y": {
        "field": "controle",
        "type": "nominal",
        "title": null,
        "sort": null
      },
      "x": {
        "field": "score",
        "type": "quantitative",
        "title": "Score de conformité (%)",
        "scale": {
          "domain": [
            0,
            100
          ]
        },
        "axis": {
          "tickCount": 5
        }
      }
    },
    "layer": [
      {
        "mark": {
          "type": "bar",
          "height": 18
        }
      },
      {
        "mark": {
          "type": "text",
          "align": "left",
          "dx": 6
        },
        "encoding": {
          "text": {
            "field": "etiquette",
            "type": "nominal"
          }
        }
      }
    ]
  }
}
