Skip to content

Instantly share code, notes, and snippets.

@jonmmease
Created November 7, 2022 17:38
Show Gist options
  • Save jonmmease/dee9ec9df97c844c1baa4896ed6fde55 to your computer and use it in GitHub Desktop.
Save jonmmease/dee9ec9df97c844c1baa4896ed6fde55 to your computer and use it in GitHub Desktop.
drilldown_dataset
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/cars.json"},
"layer": [
{
"params": [
{"name": "brush", "select": {"type": "interval", "encodings": ["x"]}}
],
"mark": "bar",
"encoding": {
"x": {"field": "Acceleration", "bin": true},
"y": {"aggregate": "count"}
}
},
{
"transform": [{"filter": {"param": "brush"}}],
"name": "drilldown",
"mark": {"type": "point", "opacity": 0}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment