{ "$schema": "https://vega.github.io/schema/vega/v5.json", "description": "A scatterplot showing horsepower and miles per gallons for various cars.", "background": "white", "padding": 5, "width": 200, "height": 200, "style": "cell", "data": [{"name": "source_0", "values": [{}]}], "signals": [ { "name": "x", "value": 25, "bind": {"input": "range", "min": 1, "max": 100, "step": 1} }, { "name": "x2", "value": 75, "bind": {"input": "range", "min": 1, "max": 100, "step": 1} }, { "name": "y", "value": 25, "bind": {"input": "range", "min": 1, "max": 100, "step": 1} }, { "name": "y2", "value": 75, "bind": {"input": "range", "min": 1, "max": 100, "step": 1} }, { "name": "strokeWidth", "value": 2, "bind": {"input": "range", "min": 0, "max": 10, "step": 0.5} }, { "name": "strokeCap", "value": "butt", "bind": {"input": "select", "options": ["butt", "round", "square"]} }, { "name": "strokeDash", "value": [1, 0], "bind": { "input": "select", "options": [[1, 0], [8, 8], [8, 4], [4, 4], [4, 2], [2, 1], [1, 1]] } } ], "marks": [ { "name": "marks", "type": "rule", "style": ["rule"], "from": {"data": "source_0"}, "encode": { "update": { "strokeCap": {"signal": "strokeCap"}, "strokeWidth": {"signal": "strokeWidth"}, "strokeDash": {"signal": "strokeDash"}, "stroke": {"value": "orange"}, "x": {"scale": "x", "signal": "x"}, "x2": {"scale": "x", "signal": "x2"}, "y": {"scale": "y", "signal": "y"}, "y2": {"scale": "y", "signal": "y2"} } } } ], "scales": [ { "name": "x", "type": "linear", "domain": [0, 100], "range": [0, {"signal": "width"}], "zero": true }, { "name": "y", "type": "linear", "domain": [0, 100], "range": [{"signal": "height"}, 0], "zero": true } ], "axes": [ { "scale": "x", "orient": "bottom", "grid": false, "labelFlush": true, "labelOverlap": true, "tickCount": {"signal": "ceil(width/40)"}, "zindex": 0 }, { "scale": "y", "orient": "left", "grid": false, "labelOverlap": true, "tickCount": {"signal": "ceil(height/40)"}, "zindex": 0 } ] }