Skip to content

Instantly share code, notes, and snippets.

@timelyportfolio
Last active September 27, 2022 13:04
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save timelyportfolio/09f4df35f89d6cb6507f99c622759065 to your computer and use it in GitHub Desktop.
vega-lite changing bar size and spacing
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"width": 1200,
"height": 900,
"data": {
"url": "data/seattle-weather.csv"
},
"mark": "bar",
"encoding": {
"x": {
"aggregate": "count",
"type": "quantitative"
},
"y": {
"field": "date",
"type": "temporal",
"timeUnit": "month",
"axis": {
"title": "Regions"
},
"scale": {
"paddingInner": 0.02,
"paddingOuter": 0
}
},
"color": {
"field": "weather",
"type": "nominal",
"scale": {
"domain": [
"0-20 days",
"21-27 days",
">28 days"
],
"range": [
"red",
"orange",
"green"
]
},
"legend": {
"title": "Case Ageing"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment