StackOverflow question
Last active
September 27, 2022 13:04
-
-
Save timelyportfolio/09f4df35f89d6cb6507f99c622759065 to your computer and use it in GitHub Desktop.
vega-lite changing bar size and spacing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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