Skip to content

Commit

Permalink
Add spec using react flag
Browse files Browse the repository at this point in the history
  • Loading branch information
joelostblom committed Jun 20, 2024
1 parent 2ea3c55 commit 8036b19
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/specs/point_constant_legend_domain.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": "https://cdn.jsdelivr.net/npm/[email protected]/data/cars.json"
},
"params": [
{
"name": "param_3",
"select": {"type": "point", "encodings": ["color"]},
"bind": "legend"
},
{"name": "param4", "expr": "domain('color')"},
{"name": "color_domain", "react": false, "expr": "param4"}
],
"transform": [{"filter": {"param": "param_3"}}],
"mark": {"type": "point", "filled": true},
"encoding": {
"color": {
"field": "Origin",
"type": "nominal",
"scale": {"domain": {"expr": "color_domain"}}
},
"x": {"field": "Horsepower", "type": "quantitative"},
"y": {"field": "Miles_per_Gallon", "type": "quantitative"}
}
}

0 comments on commit 8036b19

Please sign in to comment.