diff --git a/examples/compiled/stacked_area_without_agg.png b/examples/compiled/stacked_area_without_agg.png new file mode 100644 index 00000000000..4f28483b466 Binary files /dev/null and b/examples/compiled/stacked_area_without_agg.png differ diff --git a/examples/compiled/stacked_area_without_agg.svg b/examples/compiled/stacked_area_without_agg.svg new file mode 100644 index 00000000000..b9068665a3d --- /dev/null +++ b/examples/compiled/stacked_area_without_agg.svg @@ -0,0 +1 @@ +1.01.52.02.53.0a0.00.51.01.52.02.53.0bc1c2c \ No newline at end of file diff --git a/examples/compiled/stacked_area_without_agg.vg.json b/examples/compiled/stacked_area_without_agg.vg.json new file mode 100644 index 00000000000..ae19847da6e --- /dev/null +++ b/examples/compiled/stacked_area_without_agg.vg.json @@ -0,0 +1,145 @@ +{ + "$schema": "https://vega.github.io/schema/vega/v5.json", + "background": "white", + "padding": 5, + "width": 200, + "height": 200, + "style": "cell", + "data": [ + { + "name": "source_0", + "values": [ + {"a": 1, "b": 2, "c": "c1"}, + {"a": 2, "b": 3, "c": "c1"}, + {"a": 3, "b": 1, "c": "c1"}, + {"a": 1, "b": 2, "c": "c2"}, + {"a": 3, "b": 1, "c": "c2"}, + {"a": 2, "b": 2, "c": "c2"} + ] + }, + { + "name": "data_0", + "source": "source_0", + "transform": [ + {"type": "formula", "expr": "toNumber(datum[\"a\"])", "as": "a"} + ] + } + ], + "marks": [ + { + "name": "pathgroup", + "type": "group", + "from": { + "facet": { + "name": "faceted_path_main", + "data": "data_0", + "groupby": ["c"] + } + }, + "encode": { + "update": { + "width": {"field": {"group": "width"}}, + "height": {"field": {"group": "height"}} + } + }, + "marks": [ + { + "name": "marks", + "type": "area", + "style": ["area"], + "sort": {"field": "datum[\"a\"]"}, + "from": {"data": "faceted_path_main"}, + "encode": { + "update": { + "orient": {"value": "vertical"}, + "fill": {"scale": "color", "field": "c"}, + "description": { + "signal": "\"a: \" + (format(datum[\"a\"], \"\")) + \"; b: \" + (format(datum[\"b\"], \"\")) + \"; c: \" + (isValid(datum[\"c\"]) ? datum[\"c\"] : \"\"+datum[\"c\"])" + }, + "x": {"scale": "x", "field": "a"}, + "y": {"scale": "y", "field": "b"}, + "y2": {"scale": "y", "value": 0}, + "defined": { + "signal": "isValid(datum[\"a\"]) && isFinite(+datum[\"a\"]) && isValid(datum[\"b\"]) && isFinite(+datum[\"b\"])" + } + } + } + } + ] + } + ], + "scales": [ + { + "name": "x", + "type": "linear", + "domain": {"data": "data_0", "field": "a"}, + "range": [0, {"signal": "width"}], + "nice": true, + "zero": false + }, + { + "name": "y", + "type": "linear", + "domain": {"data": "data_0", "field": "b"}, + "range": [{"signal": "height"}, 0], + "nice": true, + "zero": true + }, + { + "name": "color", + "type": "ordinal", + "domain": {"data": "data_0", "field": "c", "sort": true}, + "range": "category" + } + ], + "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": "a", + "labelFlush": true, + "labelOverlap": true, + "tickCount": {"signal": "ceil(width/40)"}, + "zindex": 0 + }, + { + "scale": "y", + "orient": "left", + "grid": false, + "title": "b", + "labelOverlap": true, + "tickCount": {"signal": "ceil(height/40)"}, + "zindex": 0 + } + ], + "legends": [{"fill": "color", "symbolType": "circle", "title": "c"}] +} diff --git a/examples/specs/stacked_area_without_agg.vl.json b/examples/specs/stacked_area_without_agg.vl.json new file mode 100644 index 00000000000..503cc33c67a --- /dev/null +++ b/examples/specs/stacked_area_without_agg.vl.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://vega.github.io/schema/vega-lite/v5.json", + "data": { + "values": [ + {"a": 1, "b": 2, "c": "c1"}, + {"a": 2, "b": 3, "c": "c1"}, + {"a": 3, "b": 1, "c": "c1"}, + {"a": 1, "b": 2, "c": "c2"}, + {"a": 3, "b": 1, "c": "c2"}, + {"a": 2, "b": 2, "c": "c2"} + ] + }, + "mark": "area", + "encoding": { + "x": {"field": "a", "type": "quantitative"}, + "y": {"field": "b", "type": "quantitative"}, + "color": {"field": "c"} + } +}