Skip to content

Commit

Permalink
chore: update deps and rebuild examples (#9472)
Browse files Browse the repository at this point in the history
Follow up from #8921

---------

Co-authored-by: GitHub Actions Bot <[email protected]>
  • Loading branch information
domoritz and GitHub Actions Bot authored Nov 18, 2024
1 parent e3f9620 commit c0cf2ce
Show file tree
Hide file tree
Showing 9 changed files with 1,015 additions and 809 deletions.
Binary file added examples/compiled/animated_gapminder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/compiled/animated_gapminder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
210 changes: 210 additions & 0 deletions examples/compiled/animated_gapminder.vg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"background": "white",
"padding": 5,
"width": 200,
"height": 200,
"style": "cell",
"data": [
{"name": "animation_frame_store"},
{
"name": "source_0",
"url": "data/gapminder.json",
"format": {"type": "json"},
"transform": [
{
"type": "filter",
"expr": "isValid(datum[\"fertility\"]) && isFinite(+datum[\"fertility\"]) && isValid(datum[\"life_expect\"]) && isFinite(+datum[\"life_expect\"])"
}
]
},
{
"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": "year"}]
},
{
"name": "animation_frame_modify",
"on": [
{
"events": {"signal": "animation_frame_tuple"},
"update": "modify(\"animation_frame_store\", animation_frame_tuple, true)"
}
]
}
],
"marks": [
{
"name": "marks",
"type": "symbol",
"style": ["point"],
"interactive": true,
"from": {"data": "source_0_curr"},
"encode": {
"update": {
"opacity": {"value": 0.7},
"fill": {"value": "transparent"},
"stroke": {"scale": "color", "field": "country"},
"ariaRoleDescription": {"value": "point"},
"description": {
"signal": "\"fertility: \" + (format(datum[\"fertility\"], \"\")) + \"; life_expect: \" + (format(datum[\"life_expect\"], \"\")) + \"; country: \" + (isValid(datum[\"country\"]) ? datum[\"country\"] : \"\"+datum[\"country\"]) + \"; year: \" + (isValid(datum[\"year\"]) ? datum[\"year\"] : \"\"+datum[\"year\"])"
},
"x": {"scale": "x", "field": "fertility"},
"y": {"scale": "y", "field": "life_expect"}
}
}
}
],
"scales": [
{
"name": "x",
"type": "linear",
"domain": {"data": "source_0", "field": "fertility"},
"range": [0, {"signal": "width"}],
"nice": true,
"zero": true
},
{
"name": "y",
"type": "linear",
"domain": {"data": "source_0", "field": "life_expect"},
"range": [{"signal": "height"}, 0],
"nice": true,
"zero": true
},
{
"name": "color",
"type": "ordinal",
"domain": {"data": "source_0", "field": "country", "sort": true},
"range": "category"
},
{
"name": "time",
"type": "band",
"domain": {"data": "source_0", "field": "year", "sort": true},
"range": {"step": 500}
}
],
"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": "fertility",
"labelFlush": true,
"labelOverlap": true,
"tickCount": {"signal": "ceil(width/40)"},
"zindex": 0
},
{
"scale": "y",
"orient": "left",
"grid": false,
"title": "life_expect",
"labelOverlap": true,
"tickCount": {"signal": "ceil(height/40)"},
"zindex": 0
}
],
"legends": [
{
"stroke": "color",
"symbolType": "circle",
"title": "country",
"encode": {
"symbols": {
"update": {
"fill": {"value": "transparent"},
"opacity": {"value": 0.7}
}
}
}
}
]
}
2 changes: 1 addition & 1 deletion examples/compiled/dynamic_color_legend.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"width": 600,
"title": {"text": "Seattle Weather, 2012-2015", "anchor": "start"},
"data": [
{"name": "brush_store"},
{"name": "click_store"},
{"name": "brush_store"},
{
"name": "source_0",
"url": "data/seattle-weather.csv",
Expand Down
2 changes: 1 addition & 1 deletion examples/compiled/interactive_seattle_weather.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"width": 600,
"title": {"text": "Seattle Weather, 2012-2015", "anchor": "start"},
"data": [
{"name": "brush_store"},
{"name": "click_store"},
{"name": "brush_store"},
{
"name": "source_0",
"url": "data/seattle-weather.csv",
Expand Down
2 changes: 1 addition & 1 deletion examples/compiled/selection_concat.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"padding": 5,
"width": 200,
"data": [
{"name": "brush_store"},
{"name": "grid_store"},
{"name": "brush_store"},
{"name": "source_0", "url": "data/cars.json", "format": {"type": "json"}},
{
"name": "data_0",
Expand Down
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,24 @@
"url": "https://github.com/vega/vega-lite/issues"
},
"devDependencies": {
"@babel/core": "^7.24.9",
"@babel/preset-env": "^7.25.0",
"@babel/preset-typescript": "^7.24.7",
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@release-it/conventional-changelog": "^8.0.1",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-terser": "^0.4.4",
"@types/d3": "^7.4.3",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.14",
"@types/pako": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"cheerio": "^1.0.0-rc.12",
"cheerio": "^1.0.0",
"conventional-changelog-cli": "^5.0.0",
"d3": "^7.9.0",
"del-cli": "^5.1.0",
Expand All @@ -107,28 +107,28 @@
"fast-json-stable-stringify": "~2.1.0",
"highlight.js": "^11.10.0",
"jest": "^29.7.0",
"jest-dev-server": "^10.0.0",
"jest-dev-server": "^10.1.4",
"mkdirp": "^3.0.1",
"pako": "^2.1.0",
"prettier": "^3.3.3",
"puppeteer": "^15.0.0",
"release-it": "17.10.0",
"rollup": "^4.19.1",
"rollup": "^4.26.0",
"rollup-plugin-bundle-size": "^1.0.3",
"serve": "^14.2.3",
"terser": "^5.31.3",
"ts-jest": "^29.2.3",
"serve": "^14.2.4",
"terser": "^5.36.0",
"ts-jest": "^29.2.5",
"ts-json-schema-generator": "^2.3.0",
"typescript": "~5.5.4",
"vega-cli": "^5.28.0",
"vega-datasets": "^2.8.1",
"vega-embed": "^6.26.0",
"vega-tooltip": "^0.34.0",
"typescript": "~5.6.3",
"vega-cli": "^5.30.0",
"vega-datasets": "^2.10.0",
"vega-embed": "^6.28.0",
"vega-tooltip": "^0.35.1",
"yaml-front-matter": "^4.1.1"
},
"dependencies": {
"json-stringify-pretty-compact": "~3.0.0",
"tslib": "~2.6.3",
"tslib": "~2.8.1",
"vega-event-selector": "~3.0.1",
"vega-expression": "~5.1.1",
"vega-util": "~1.17.2",
Expand All @@ -140,5 +140,5 @@
"engines": {
"node": ">=18"
},
"packageManager": "[email protected].19"
"packageManager": "[email protected].22"
}
2 changes: 1 addition & 1 deletion src/compile/selection/scales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ export function domain(model: UnitModel, channel: ScaleChannel) {
}

function isTopLevelLayer(model: Model): boolean {
return model.parent && isLayerModel(model.parent) && (!model.parent.parent ?? isTopLevelLayer(model.parent.parent));
return model.parent && isLayerModel(model.parent) && (!model.parent.parent || isTopLevelLayer(model.parent.parent));
}
Loading

0 comments on commit c0cf2ce

Please sign in to comment.