diff --git a/examples/compiled/interactive_point_domainRaw_binding.png b/examples/compiled/interactive_point_domainRaw_binding.png new file mode 100644 index 0000000000..eace58471b Binary files /dev/null and b/examples/compiled/interactive_point_domainRaw_binding.png differ diff --git a/examples/compiled/interactive_point_domainRaw_binding.svg b/examples/compiled/interactive_point_domainRaw_binding.svg new file mode 100644 index 0000000000..bfcc3c8d9e --- /dev/null +++ b/examples/compiled/interactive_point_domainRaw_binding.svg @@ -0,0 +1 @@ +50100150200250Horsepower01020304050Miles_per_Gallon2468Cylinders \ No newline at end of file diff --git a/examples/compiled/interactive_point_domainRaw_binding.vg.json b/examples/compiled/interactive_point_domainRaw_binding.vg.json new file mode 100644 index 0000000000..45d5a3127d --- /dev/null +++ b/examples/compiled/interactive_point_domainRaw_binding.vg.json @@ -0,0 +1,148 @@ +{ + "$schema": "https://vega.github.io/schema/vega/v5.json", + "background": "white", + "padding": 5, + "width": 200, + "height": 200, + "style": "cell", + "data": [ + { + "name": "source_0", + "url": "data/cars.json", + "format": {"type": "json"}, + "transform": [ + { + "type": "filter", + "expr": "isValid(datum[\"Horsepower\"]) && isFinite(+datum[\"Horsepower\"]) && isValid(datum[\"Miles_per_Gallon\"]) && isFinite(+datum[\"Miles_per_Gallon\"]) && isValid(datum[\"Cylinders\"]) && isFinite(+datum[\"Cylinders\"])" + } + ] + } + ], + "signals": [ + { + "name": "min_x", + "value": 50, + "bind": {"input": "range", "min": 0, "max": 300} + }, + { + "name": "max_x", + "value": 250, + "bind": {"input": "range", "min": 0, "max": 300} + }, + {"name": "use_custom_x", "value": true, "bind": {"input": "checkbox"}} + ], + "marks": [ + { + "name": "marks", + "type": "symbol", + "clip": true, + "style": ["circle"], + "from": {"data": "source_0"}, + "encode": { + "update": { + "opacity": {"value": 0.7}, + "fill": {"value": "#4c78a8"}, + "ariaRoleDescription": {"value": "circle"}, + "description": { + "signal": "\"Horsepower: \" + (format(datum[\"Horsepower\"], \"\")) + \"; Miles_per_Gallon: \" + (format(datum[\"Miles_per_Gallon\"], \"\")) + \"; Cylinders: \" + (format(datum[\"Cylinders\"], \"\"))" + }, + "x": {"scale": "x", "field": "Horsepower"}, + "y": {"scale": "y", "field": "Miles_per_Gallon"}, + "size": {"scale": "size", "field": "Cylinders"}, + "shape": {"value": "circle"} + } + } + } + ], + "scales": [ + { + "name": "x", + "type": "linear", + "domain": {"data": "source_0", "field": "Horsepower"}, + "range": [0, {"signal": "width"}], + "domainRaw": {"signal": "use_custom_x ? [min_x, max_x] : null"}, + "nice": true, + "zero": true + }, + { + "name": "y", + "type": "linear", + "domain": {"data": "source_0", "field": "Miles_per_Gallon"}, + "range": [{"signal": "height"}, 0], + "nice": true, + "zero": true + }, + { + "name": "size", + "type": "linear", + "domain": {"data": "source_0", "field": "Cylinders"}, + "range": [0, 361], + "zero": true + } + ], + "axes": [ + { + "scale": "x", + "orient": "bottom", + "gridScale": "y", + "grid": true, + "tickCount": {"signal": "ceil(width/40)"}, + "domain": false, + "labels": false, + "aria": false, + "maxExtent": 0, + "minExtent": 0, + "ticks": false, + "zindex": 0 + }, + { + "scale": "y", + "orient": "left", + "gridScale": "x", + "grid": true, + "tickCount": {"signal": "ceil(height/40)"}, + "domain": false, + "labels": false, + "aria": false, + "maxExtent": 0, + "minExtent": 0, + "ticks": false, + "zindex": 0 + }, + { + "scale": "x", + "orient": "bottom", + "grid": false, + "title": "Horsepower", + "labelFlush": true, + "labelOverlap": true, + "tickCount": {"signal": "ceil(width/40)"}, + "zindex": 0 + }, + { + "scale": "y", + "orient": "left", + "grid": false, + "title": "Miles_per_Gallon", + "labelOverlap": true, + "tickCount": {"signal": "ceil(height/40)"}, + "zindex": 0 + } + ], + "legends": [ + { + "size": "size", + "symbolType": "circle", + "title": "Cylinders", + "encode": { + "symbols": { + "update": { + "fill": {"value": "#4c78a8"}, + "opacity": {"value": 0.7}, + "stroke": {"value": "transparent"} + } + } + } + } + ] +}