diff --git a/examples/compiled/bar_ranged_not_binned.png b/examples/compiled/bar_ranged_not_binned.png new file mode 100644 index 0000000000..b981f6e5f2 Binary files /dev/null and b/examples/compiled/bar_ranged_not_binned.png differ diff --git a/examples/compiled/bar_ranged_not_binned.svg b/examples/compiled/bar_ranged_not_binned.svg new file mode 100644 index 0000000000..8200bb1ba7 --- /dev/null +++ b/examples/compiled/bar_ranged_not_binned.svg @@ -0,0 +1 @@ +020406080100b020406080100b, b2 \ No newline at end of file diff --git a/examples/compiled/bar_ranged_not_binned.vg.json b/examples/compiled/bar_ranged_not_binned.vg.json new file mode 100644 index 0000000000..415bc4d1a2 --- /dev/null +++ b/examples/compiled/bar_ranged_not_binned.vg.json @@ -0,0 +1,123 @@ +{ + "$schema": "https://vega.github.io/schema/vega/v5.json", + "background": "white", + "padding": 5, + "width": 200, + "height": 200, + "style": "cell", + "data": [ + { + "name": "source_0", + "values": [ + {"b": 28, "b2": 0}, + {"b": 55, "b2": 0}, + {"b": 43, "b2": 0}, + {"b": 91, "b2": 0}, + {"b": 81, "b2": 0}, + {"b": 53, "b2": 0}, + {"b": 19, "b2": 0}, + {"b": 87, "b2": 0}, + {"b": 52, "b2": 0} + ] + }, + { + "name": "data_0", + "source": "source_0", + "transform": [ + { + "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\"], \"\")) + \"; b2: \" + (format(datum[\"b2\"], \"\"))" + }, + "x": {"scale": "x", "field": "b"}, + "x2": {"scale": "x", "value": 0}, + "y": {"scale": "y", "field": "b"}, + "y2": {"scale": "y", "field": "b2"} + } + } + } + ], + "scales": [ + { + "name": "x", + "type": "linear", + "domain": {"data": "data_0", "field": "b"}, + "range": [0, {"signal": "width"}], + "nice": true, + "zero": true + }, + { + "name": "y", + "type": "linear", + "domain": {"data": "data_0", "fields": ["b", "b2"]}, + "range": [{"signal": "height"}, 0], + "nice": true, + "zero": false, + "padding": 5 + } + ], + "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": "b", + "labelFlush": true, + "labelOverlap": true, + "tickCount": {"signal": "ceil(width/40)"}, + "zindex": 0 + }, + { + "scale": "y", + "orient": "left", + "grid": false, + "title": "b, b2", + "labelOverlap": true, + "tickCount": {"signal": "ceil(height/40)"}, + "zindex": 0 + } + ] +} diff --git a/examples/specs/bar_ranged_not_binned.vl.json b/examples/specs/bar_ranged_not_binned.vl.json new file mode 100644 index 0000000000..d8ca28ff02 --- /dev/null +++ b/examples/specs/bar_ranged_not_binned.vl.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://vega.github.io/schema/vega-lite/v5.json", + "data": { + "values": [ + { "b": 28, "b2": 0}, { "b": 55, "b2": 0}, { "b": 43, "b2": 0}, + { "b": 91, "b2": 0}, { "b": 81, "b2": 0}, { "b": 53, "b2": 0}, + { "b": 19, "b2": 0}, { "b": 87, "b2": 0}, { "b": 52, "b2": 0} + ] + }, + "mark": {"type": "bar"}, + "encoding": { + "x": {"field": "b", "type": "quantitative"}, + "y": {"field": "b", "type": "quantitative"}, + "y2": {"field": "b2"} + } +}