From 277e556529cbaecc1f2682a12691d74aeac64b18 Mon Sep 17 00:00:00 2001 From: Younghoon Kim Date: Wed, 19 Jul 2023 10:39:11 -0700 Subject: [PATCH] Add the example --- .../compiled/stacked_area_without_agg.png | Bin 0 -> 7259 bytes .../compiled/stacked_area_without_agg.svg | 1 + .../compiled/stacked_area_without_agg.vg.json | 145 ++++++++++++++++++ .../specs/stacked_area_without_agg.vl.json | 19 +++ 4 files changed, 165 insertions(+) create mode 100644 examples/compiled/stacked_area_without_agg.png create mode 100644 examples/compiled/stacked_area_without_agg.svg create mode 100644 examples/compiled/stacked_area_without_agg.vg.json create mode 100644 examples/specs/stacked_area_without_agg.vl.json diff --git a/examples/compiled/stacked_area_without_agg.png b/examples/compiled/stacked_area_without_agg.png new file mode 100644 index 0000000000000000000000000000000000000000..4f28483b466d0474b069a99236e310a3bd097ee1 GIT binary patch literal 7259 zcmb_hcT|(jmky$UNDF?_OGxM)KYEo8B3+b@p(s^qXaXWN5HN-!N^eqBL`0<5fPe~$ zbVRyx)72)k^CuE z(w9yKs?=)B2{t0G9=Au&3-#t_4VeTO54dK%vAtE6@zk=ywD_l~-OI01WtG>jtoj)$ z;CL;eH|Z4kpc?IhmGEyH@JEEBzHSy>Sd_0%@5RZls8w2mLbfkojpw@W0%Jb(yeb5W z`!YT!8jhy8!vw{ti6@|SpiEjCg%nf>xXJkd0Ru}5i@5jiCC6)h$!9+%;-7G-r?dOc ze_?iXbc6{DQ(fl0@g$!LZUWVnFVIcqZFQDx8y;qqkdP2(Nn}{&Gt6#(ZBaS3zK%sL z4E`bKet&l>Sc!@( zvco~?!A`rWp%RZ-sblfFYtLT0Q9{nvLkeT;ezy(H@iiSC^f=G^j76lQBumA;uN=Zw zAE>;&y~Us3koBI4(qy_oMwVYvLIKw27Z9ij4)i&Pn5AGVPP6A zeFfSikoD$M<>0NwM;jYnerw~SF2f6*subbdqfeC9p0moT_&|A+FR~<({j5WgLblc? zIe}mJk8Lw+4a~TAab$AVl9k=Mq)N9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Dt-q7czYyx zcN*H-vp_jWspt0LYS2g210O*4 \ 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"} + } +}