diff --git a/examples/compiled/bar_1d_dimension_only.png b/examples/compiled/bar_1d_dimension_only.png new file mode 100644 index 0000000000..5763fa0705 Binary files /dev/null and b/examples/compiled/bar_1d_dimension_only.png differ diff --git a/examples/compiled/bar_1d_dimension_only.svg b/examples/compiled/bar_1d_dimension_only.svg new file mode 100644 index 0000000000..7f1fec9a52 --- /dev/null +++ b/examples/compiled/bar_1d_dimension_only.svg @@ -0,0 +1 @@ +0102030405060b \ No newline at end of file diff --git a/examples/compiled/bar_1d_dimension_only.vg.json b/examples/compiled/bar_1d_dimension_only.vg.json new file mode 100644 index 0000000000..86fadf6500 --- /dev/null +++ b/examples/compiled/bar_1d_dimension_only.vg.json @@ -0,0 +1,94 @@ +{ + "$schema": "https://vega.github.io/schema/vega/v5.json", + "description": "A simple bar chart with embedded data.", + "background": "white", + "padding": 5, + "width": 20, + "height": 200, + "style": "cell", + "data": [ + { + "name": "source_0", + "values": [ + {"b": 0}, + {"b": 10}, + {"b": 10}, + {"b": 10}, + {"b": 10}, + {"b": 20} + ] + }, + { + "name": "data_0", + "source": "source_0", + "transform": [ + { + "type": "stack", + "groupby": [], + "field": "b", + "sort": {"field": [], "order": []}, + "as": ["b_start", "b_end"], + "offset": "zero" + }, + { + "type": "filter", + "expr": "isValid(datum[\"b\"]) && isFinite(+datum[\"b\"])" + } + ] + } + ], + "marks": [ + { + "name": "marks", + "type": "rect", + "style": ["bar"], + "from": {"data": "data_0"}, + "encode": { + "update": { + "fill": {"value": "#4c78a8"}, + "ariaRoleDescription": {"value": "bar"}, + "description": {"signal": "\"b: \" + (format(datum[\"b\"], \"\"))"}, + "x": {"field": {"group": "width"}}, + "x2": {"value": 0}, + "yc": {"scale": "y", "field": "b"}, + "height": {"value": 5} + } + } + } + ], + "scales": [ + { + "name": "y", + "type": "linear", + "domain": {"data": "data_0", "fields": ["b_start", "b_end"]}, + "range": [{"signal": "height"}, 0], + "nice": true, + "zero": false, + "padding": 5 + } + ], + "axes": [ + { + "scale": "y", + "orient": "left", + "grid": true, + "tickCount": {"signal": "ceil(height/40)"}, + "domain": false, + "labels": false, + "aria": false, + "maxExtent": 0, + "minExtent": 0, + "ticks": false, + "zindex": 0 + }, + { + "scale": "y", + "orient": "left", + "grid": false, + "title": "b", + "labelOverlap": true, + "tickCount": {"signal": "ceil(height/40)"}, + "zindex": 0 + } + ] +}