Module

x/vega_lite/examples/specs/bar_axis_orient_signal_future.vl.json

A concise grammar of interactive graphics, built on Vega.
Latest
File
{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "description": "A bar chart that uses signals for axis orient.", "data": { "values": [ {"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43}, {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53}, {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52} ] }, "mark": "bar", "encoding": { "x": { "field": "a", "type": "ordinal", "axis": {"orient": {"signal": "xAxisOrient"}} }, "y": { "field": "b", "type": "quantitative", "axis": {"orient": {"signal": "yAxisOrient"}} } }, "config": { "signals": [ { "name": "xAxisOrient", "value": "bottom", "bind": {"input": "select", "options": ["top", "bottom"]} }, { "name": "yAxisOrient", "value": "left", "bind": {"input": "select", "options": ["left", "right"]} } ] }}