Skip to content

Instantly share code, notes, and snippets.

@jonmmease
Created November 15, 2022 14:17
Show Gist options
  • Save jonmmease/39fa071a1590a0f463deae823c8bf1db to your computer and use it in GitHub Desktop.
Save jonmmease/39fa071a1590a0f463deae823c8bf1db to your computer and use it in GitHub Desktop.
drilldown_timeunit_bar
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/seattle-weather.csv"},
"width": 600,
"layer": [
{
"params": [
{"name": "brush", "select": {"type": "interval", "encodings": ["x"]}}
],
"mark": "bar",
"encoding": {
"x": {"timeUnit": "month", "field": "date", "type": "temporal"},
"y": {
"aggregate": "mean",
"field": "precipitation",
"type": "quantitative"
},
"opacity": {"condition": {"param": "brush", "value": 1}, "value": 0.7}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment