Survey Results (Bar Chart)
A simple categorical bar chart — swap in your own values.
Rendering…
Make it your own.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Survey responses by option",
"data": {
"values": [
{"option": "Strongly agree", "count": 42},
{"option": "Agree", "count": 73},
{"option": "Neutral", "count": 35},
{"option": "Disagree", "count": 18},
{"option": "Strongly disagree", "count": 9}
]
},
"mark": {"type": "bar", "cornerRadiusEnd": 3},
"encoding": {
"y": {"field": "option", "type": "nominal", "sort": "-x", "title": null},
"x": {"field": "count", "type": "quantitative", "title": "Responses"},
"color": {"field": "count", "type": "quantitative", "legend": null, "scale": {"scheme": "blues"}}
}
}