From 05434e3173679f0d2c8ee059dab3ea34953ce834 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Wed, 20 Nov 2024 13:59:42 -0500 Subject: [PATCH 1/2] chore: add missing file extension --- examples/specs/{animated_hop.json => animated_hop.vl.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/specs/{animated_hop.json => animated_hop.vl.json} (100%) diff --git a/examples/specs/animated_hop.json b/examples/specs/animated_hop.vl.json similarity index 100% rename from examples/specs/animated_hop.json rename to examples/specs/animated_hop.vl.json From 9e263a8d1393e51cdd94a34422d670957d751002 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Wed, 20 Nov 2024 19:01:49 +0000 Subject: [PATCH 2/2] chore: update examples [CI] --- examples/compiled/animated_hop.png | Bin 0 -> 5407 bytes examples/compiled/animated_hop.svg | 1 + examples/compiled/animated_hop.vg.json | 157 +++++++++++++++++++++++++ 3 files changed, 158 insertions(+) create mode 100644 examples/compiled/animated_hop.png create mode 100644 examples/compiled/animated_hop.svg create mode 100644 examples/compiled/animated_hop.vg.json diff --git a/examples/compiled/animated_hop.png b/examples/compiled/animated_hop.png new file mode 100644 index 0000000000000000000000000000000000000000..d14fcdc55798259ca7ba3444d8e4d6002537c580 GIT binary patch literal 5407 zcmYkA1z3||+xN$4ke(ndNQX2Cl4Ia#hBQ1h2-2a1NQ@kU5)#rO3eq6mF+h-%QPL73 zsf2)t@5S>S-|@byd)slxbzkTI{GY$`!szQhpde!+gFqk@8c2iz*s6f{0tpfL6ruV& z3pPY{S`QGAf7j3a_V+0e2y99Np<)=2z4xC$eb`LnRkYbGG4+i&0u=(bxI+@;Cug>O zJG{Hpl46=%cl(fPmTUBMf}NT$?n(@gc{hTte#m)2xI0R`2?kZC2}Yx7EveOR(GxrE z{3f2a<@}}TFH|pg*+n0sL74lsw#Tc0gjrD^gh;4;MNV@AT+$7YcT0f zQeGYvGc&V;qvM1-9j`6|g`yD<6cl^9Yw9e?bl31Z3m@g-qW>~VLqnq~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5Kvil0H9g9^pW!?loQ!&&|NVASrp76V?KZuCg-JWakGTvIuD3FOjIU zW~u@$iH?Xs>FYz@Xh(y83!0l5+k;LDzuqUC%;z|xgT|E~QgBmGs4%fw+o*#cTEC;C zV+u62S_w>2aYKWHqFXaNQDNe~r7IxsuNSG7mzQ@_iB7tAx%?iOTIK(r6)4DI=;c#s VPpaDrRA9vuqM@dXsD#^~{|CExHIx7V literal 0 HcmV?d00001 diff --git a/examples/compiled/animated_hop.svg b/examples/compiled/animated_hop.svg new file mode 100644 index 0000000000..4d501cb6ae --- /dev/null +++ b/examples/compiled/animated_hop.svg @@ -0,0 +1 @@ +0102030405060precipitation \ No newline at end of file diff --git a/examples/compiled/animated_hop.vg.json b/examples/compiled/animated_hop.vg.json new file mode 100644 index 0000000000..6c5fe079be --- /dev/null +++ b/examples/compiled/animated_hop.vg.json @@ -0,0 +1,157 @@ +{ + "$schema": "https://vega.github.io/schema/vega/v5.json", + "background": "white", + "padding": 5, + "width": 20, + "height": 200, + "style": "cell", + "data": [ + {"name": "animation_frame_store"}, + { + "name": "source_0", + "url": "data/seattle-weather.csv", + "format": {"type": "csv"}, + "transform": [ + { + "type": "filter", + "expr": "isValid(datum[\"precipitation\"]) && isFinite(+datum[\"precipitation\"])" + } + ] + }, + { + "name": "source_0_curr", + "source": "source_0", + "transform": [ + { + "type": "filter", + "expr": "!length(data(\"animation_frame_store\")) || vlSelectionTest(\"animation_frame_store\", datum)" + } + ] + } + ], + "signals": [ + { + "name": "unit", + "value": {}, + "on": [ + {"events": "pointermove", "update": "isTuple(group()) ? group() : unit"} + ] + }, + { + "name": "animation_frame", + "update": "vlSelectionResolve(\"animation_frame_store\", \"union\", true, true)" + }, + { + "name": "anim_clock", + "init": "0", + "on": [ + { + "events": {"type": "timer", "throttle": 16.666666666666668}, + "update": "is_playing ? (anim_clock + (now() - last_tick_at) > max_range_extent ? 0 : anim_clock + (now() - last_tick_at)) : anim_clock" + } + ] + }, + { + "name": "last_tick_at", + "init": "now()", + "on": [ + { + "events": [{"signal": "anim_clock"}, {"signal": "is_playing"}], + "update": "now()" + } + ] + }, + {"name": "is_playing", "init": "true"}, + {"name": "eased_anim_clock", "update": "anim_clock"}, + {"name": "animation_frame_domain", "init": "domain('time')"}, + {"name": "min_extent", "init": "extent(animation_frame_domain)[0]"}, + {"name": "max_range_extent", "init": "extent(range('time'))[1]"}, + {"name": "anim_value", "update": "invert('time', eased_anim_clock)"}, + { + "name": "animation_frame_tuple", + "on": [ + { + "events": [{"signal": "eased_anim_clock"}, {"signal": "anim_value"}], + "update": "{unit: \"\", fields: animation_frame_tuple_fields, values: [anim_value ? anim_value : min_extent]}", + "force": true + } + ] + }, + { + "name": "animation_frame_tuple_fields", + "value": [{"type": "E", "field": "date"}] + }, + { + "name": "animation_frame_modify", + "on": [ + { + "events": {"signal": "animation_frame_tuple"}, + "update": "modify(\"animation_frame_store\", animation_frame_tuple, true)" + } + ] + } + ], + "marks": [ + { + "name": "marks", + "type": "rect", + "style": ["tick"], + "interactive": true, + "from": {"data": "source_0_curr"}, + "encode": { + "update": { + "opacity": {"value": 0.7}, + "fill": {"value": "#4c78a8"}, + "ariaRoleDescription": {"value": "tick"}, + "description": { + "signal": "\"precipitation: \" + (format(datum[\"precipitation\"], \"\")) + \"; date: \" + (isValid(datum[\"date\"]) ? datum[\"date\"] : \"\"+datum[\"date\"])" + }, + "xc": {"signal": "width", "mult": 0.5}, + "width": {"signal": "0.75 * width"}, + "yc": {"scale": "y", "field": "precipitation"}, + "height": {"value": 3} + } + } + } + ], + "scales": [ + { + "name": "y", + "type": "linear", + "domain": {"data": "source_0", "field": "precipitation"}, + "range": [{"signal": "height"}, 0], + "nice": true, + "zero": true + }, + { + "name": "time", + "type": "band", + "domain": {"data": "source_0", "field": "date", "sort": true}, + "range": {"step": 500} + } + ], + "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": "precipitation", + "labelOverlap": true, + "tickCount": {"signal": "ceil(height/40)"}, + "zindex": 0 + } + ] +}