diff --git a/examples/specs/interactive_crossfilter.vl.json b/examples/specs/interactive_crossfilter.vl.json new file mode 100644 index 0000000000..dd6f563ea6 --- /dev/null +++ b/examples/specs/interactive_crossfilter.vl.json @@ -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} + } + }] + } +} diff --git a/site/_data/examples.json b/site/_data/examples.json index a1fab1f006..d914990101 100644 --- a/site/_data/examples.json +++ b/site/_data/examples.json @@ -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",