Skip to content

Commit

Permalink
docs(examples): split crossfilter example into filter/highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Oct 17, 2023
1 parent 4b8a24f commit ec37f79
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
26 changes: 26 additions & 0 deletions examples/specs/interactive_crossfilter.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"url": "data/flights-2k.json",
"format": {"parse": {"date": "date"}}
},
"transform": [{"calculate": "hours(datum.date)", "as": "time"}],
"repeat": {"column": ["distance", "delay", "time"]},
"spec": {
"layer": [{
"params": [{
"name": "brush",
"select": {"type": "interval", "encodings": ["x"]}
}],
"transform": [{"filter": {"param": "brush"}}],
"mark": "bar",
"encoding": {
"x": {
"field": {"repeat": "column"},
"bin": {"maxbins": 20}
},
"y": {"aggregate": "count", "axis": null}
}
}]
}
}
6 changes: 5 additions & 1 deletion site/_data/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -911,9 +911,13 @@
"name": "interactive_overview_detail",
"title": "Overview and Detail"
},
{
"name": "interactive_crossfilter",
"title": "Crossfilter (Filter)"
},
{
"name": "interactive_layered_crossfilter",
"title": "Crossfilter"
"title": "Crossfilter (Highlight)"
},
{
"name": "interactive_splom",
Expand Down

0 comments on commit ec37f79

Please sign in to comment.