├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ ├── CI.yml │ └── Release.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── DEVELOP.md ├── LICENSE ├── README.md ├── binder └── requirements.txt ├── pixi.lock ├── pixi.toml ├── thirdparty_font.md ├── thirdparty_javascript.md ├── thirdparty_rust.yaml ├── vl-convert-python ├── Cargo.toml ├── LICENSE ├── README.md ├── notebooks │ └── convert_vegalite.ipynb ├── pyproject.toml ├── src │ └── lib.rs ├── tests │ ├── test_get_local_tz.py │ ├── test_get_locales.py │ ├── test_specs.py │ └── test_themes.py ├── thirdparty_font.md ├── thirdparty_javascript.md ├── thirdparty_rust.yaml └── vl_convert.pyi ├── vl-convert-rs ├── Cargo.toml ├── LICENSE ├── README.md ├── examples │ └── conversion1.rs ├── fonts │ └── liberation-sans │ │ ├── LiberationSans-Bold.ttf │ │ ├── LiberationSans-BoldItalic.ttf │ │ ├── LiberationSans-Italic.ttf │ │ ├── LiberationSans-Regular.ttf │ │ └── SIL Open Font License.txt ├── locales │ ├── format │ │ ├── ar-001.json │ │ ├── ar-AE.json │ │ ├── ar-BH.json │ │ ├── ar-DJ.json │ │ ├── ar-DZ.json │ │ ├── ar-EG.json │ │ ├── ar-EH.json │ │ ├── ar-ER.json │ │ ├── ar-IL.json │ │ ├── ar-IQ.json │ │ ├── ar-JO.json │ │ ├── ar-KM.json │ │ ├── ar-KW.json │ │ ├── ar-LB.json │ │ ├── ar-LY.json │ │ ├── ar-MA.json │ │ ├── ar-MR.json │ │ ├── ar-OM.json │ │ ├── ar-PS.json │ │ ├── ar-QA.json │ │ ├── ar-SA.json │ │ ├── ar-SD.json │ │ ├── ar-SO.json │ │ ├── ar-SS.json │ │ ├── ar-SY.json │ │ ├── ar-TD.json │ │ ├── ar-TN.json │ │ ├── ar-YE.json │ │ ├── ca-ES.json │ │ ├── cs-CZ.json │ │ ├── da-DK.json │ │ ├── de-CH.json │ │ ├── de-DE.json │ │ ├── en-CA.json │ │ ├── en-GB.json │ │ ├── en-IE.json │ │ ├── en-IN.json │ │ ├── en-US.json │ │ ├── es-BO.json │ │ ├── es-ES.json │ │ ├── es-MX.json │ │ ├── fi-FI.json │ │ ├── fr-CA.json │ │ ├── fr-FR.json │ │ ├── he-IL.json │ │ ├── hu-HU.json │ │ ├── it-IT.json │ │ ├── ja-JP.json │ │ ├── ko-KR.json │ │ ├── mk-MK.json │ │ ├── nl-NL.json │ │ ├── pl-PL.json │ │ ├── pt-BR.json │ │ ├── pt-PT.json │ │ ├── ru-RU.json │ │ ├── sl-SI.json │ │ ├── sv-SE.json │ │ ├── uk-UA.json │ │ └── zh-CN.json │ └── time-format │ │ ├── ar-EG.json │ │ ├── ar-SY.json │ │ ├── ca-ES.json │ │ ├── cs-CZ.json │ │ ├── da-DK.json │ │ ├── de-CH.json │ │ ├── de-DE.json │ │ ├── en-CA.json │ │ ├── en-GB.json │ │ ├── en-US.json │ │ ├── es-ES.json │ │ ├── es-MX.json │ │ ├── fa-IR.json │ │ ├── fi-FI.json │ │ ├── fr-CA.json │ │ ├── fr-FR.json │ │ ├── he-IL.json │ │ ├── hr-HR.json │ │ ├── hu-HU.json │ │ ├── it-IT.json │ │ ├── ja-JP.json │ │ ├── ko-KR.json │ │ ├── mk-MK.json │ │ ├── nb-NO.json │ │ ├── nl-BE.json │ │ ├── nl-NL.json │ │ ├── pl-PL.json │ │ ├── pt-BR.json │ │ ├── ru-RU.json │ │ ├── sv-SE.json │ │ ├── tr-TR.json │ │ ├── uk-UA.json │ │ ├── vi-VN.json │ │ ├── zh-CN.json │ │ └── zh-TW.json ├── src │ ├── converter.rs │ ├── html.rs │ ├── image_loading.rs │ ├── lib.rs │ ├── module_loader │ │ ├── import_map.rs │ │ └── mod.rs │ └── text.rs ├── tests │ ├── fonts │ │ ├── Caveat │ │ │ ├── Caveat-VariableFont_wght.ttf │ │ │ ├── OFL.txt │ │ │ ├── README.txt │ │ │ └── static │ │ │ │ ├── Caveat-Bold.ttf │ │ │ │ ├── Caveat-Medium.ttf │ │ │ │ ├── Caveat-Regular.ttf │ │ │ │ └── Caveat-SemiBold.ttf │ │ └── matter │ │ │ ├── Matter-Bold.ttf │ │ │ ├── Matter-BoldItalic.ttf │ │ │ ├── Matter-Heavy.ttf │ │ │ ├── Matter-HeavyItalic.ttf │ │ │ ├── Matter-Light.ttf │ │ │ ├── Matter-LightItalic.ttf │ │ │ ├── Matter-Medium.ttf │ │ │ ├── Matter-MediumItalic.ttf │ │ │ ├── Matter-Regular.ttf │ │ │ ├── Matter-RegularItalic.ttf │ │ │ ├── Matter-SemiBold.ttf │ │ │ ├── Matter-SemiBoldItalic.ttf │ │ │ ├── demo.html │ │ │ └── stylesheet.css │ ├── locale │ │ ├── format │ │ │ └── it-IT.json │ │ └── time-format │ │ │ └── it-IT.json │ ├── test_specs.rs │ ├── test_themes.rs │ └── vl-specs │ │ ├── bar_chart_trellis_compact.vl.json │ │ ├── circle_binned.vl.json │ │ ├── circle_binned_base_url.vl.json │ │ ├── custom_projection.vl.json │ │ ├── expected │ │ ├── v5_14 │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h.vg.json │ │ │ └── stacked_bar_h.vg.pretty.json │ │ ├── v5_15 │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h.vg.json │ │ │ └── stacked_bar_h.vg.pretty.json │ │ ├── v5_16 │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h.vg.json │ │ │ └── stacked_bar_h.vg.pretty.json │ │ ├── v5_17 │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h.vg.json │ │ │ └── stacked_bar_h.vg.pretty.json │ │ ├── v5_19 │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h.vg.json │ │ │ └── stacked_bar_h.vg.pretty.json │ │ ├── v5_20 │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h.vg.json │ │ │ └── stacked_bar_h.vg.pretty.json │ │ ├── v5_21 │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h.vg.json │ │ │ └── stacked_bar_h.vg.pretty.json │ │ ├── v5_8 │ │ │ ├── bar_chart_trellis_compact-excel.png │ │ │ ├── bar_chart_trellis_compact.png │ │ │ ├── bar_chart_trellis_compact.svg │ │ │ ├── circle_binned-dark.png │ │ │ ├── circle_binned.png │ │ │ ├── circle_binned.svg │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── circle_binned_base_url.png │ │ │ ├── circle_binned_base_url.svg │ │ │ ├── custom_projection.png │ │ │ ├── float_font_size.png │ │ │ ├── float_font_size.svg │ │ │ ├── font_with_quotes.png │ │ │ ├── geoScale.png │ │ │ ├── geoScale.sg.json │ │ │ ├── gh_174.png │ │ │ ├── line_with_log_scale-fivethirtyeight.png │ │ │ ├── line_with_log_scale.png │ │ │ ├── line_with_log_scale.svg │ │ │ ├── long_legend_label.png │ │ │ ├── long_text_lable.png │ │ │ ├── lookup_urls.png │ │ │ ├── maptile_background.png │ │ │ ├── maptile_background_2.png │ │ │ ├── no_text_in_font_metrics.png │ │ │ ├── no_text_in_font_metrics.sg.json │ │ │ ├── no_text_in_font_metrics.svg │ │ │ ├── numeric_font_weight.svg │ │ │ ├── quakes_initial_selection.png │ │ │ ├── remote_images.png │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h-vox.png │ │ │ ├── stacked_bar_h.png │ │ │ ├── stacked_bar_h.svg │ │ │ ├── stacked_bar_h.vg.json │ │ │ ├── stacked_bar_h.vg.pretty.json │ │ │ ├── stacked_bar_h2.png │ │ │ ├── stocks_locale.png │ │ │ ├── table_heatmap.png │ │ │ └── table_heatmap.sg.json │ │ └── v6_1 │ │ │ ├── circle_binned.vg.json │ │ │ ├── circle_binned.vg.pretty.json │ │ │ ├── seattle-weather.vg.json │ │ │ ├── seattle-weather.vg.pretty.json │ │ │ ├── stacked_bar_h.vg.json │ │ │ └── stacked_bar_h.vg.pretty.json │ │ ├── float_font_size.vl.json │ │ ├── font_with_quotes.vl.json │ │ ├── geoScale.vl.json │ │ ├── gh_174.vl.json │ │ ├── line_with_log_scale.vl.json │ │ ├── long_legend_label.vl.json │ │ ├── long_text_lable.vl.json │ │ ├── lookup_urls.vl.json │ │ ├── maptile_background.vl.json │ │ ├── maptile_background_2.vl.json │ │ ├── no_text_in_font_metrics.vl.json │ │ ├── numeric_font_weight.vl.json │ │ ├── quakes_initial_selection.vl.json │ │ ├── remote_images.vl.json │ │ ├── seattle-weather.vl.json │ │ ├── stacked_bar_h.vl.json │ │ ├── stacked_bar_h2.vl.json │ │ ├── stocks_locale.vl.json │ │ └── table_heatmap.vl.json ├── thirdparty_font.md ├── thirdparty_javascript.md ├── thirdparty_rust.yaml ├── vendor │ ├── cdn.jsdelivr.net │ │ └── npm │ │ │ ├── clone@2.1.2 │ │ │ └── +esm.js │ │ │ ├── d3-array@3.2.4 │ │ │ └── +esm.js │ │ │ ├── d3-color@3.1.0 │ │ │ └── +esm.js │ │ │ ├── d3-delaunay@6.0.4 │ │ │ └── +esm.js │ │ │ ├── d3-dispatch@3.0.1 │ │ │ └── +esm.js │ │ │ ├── d3-dsv@3.0.1 │ │ │ └── +esm.js │ │ │ ├── d3-force@3.0.0 │ │ │ └── +esm.js │ │ │ ├── d3-format@3.1.0 │ │ │ └── +esm.js │ │ │ ├── d3-geo-projection@4.0.0 │ │ │ └── +esm.js │ │ │ ├── d3-geo@3.1.1 │ │ │ └── +esm.js │ │ │ ├── d3-hierarchy@3.1.2 │ │ │ └── +esm.js │ │ │ ├── d3-interpolate@3.0.1 │ │ │ └── +esm.js │ │ │ ├── d3-path@3.1.0 │ │ │ └── +esm.js │ │ │ ├── d3-quadtree@3.0.1 │ │ │ └── +esm.js │ │ │ ├── d3-scale-chromatic@3.1.0 │ │ │ └── +esm.js │ │ │ ├── d3-scale@4.0.2 │ │ │ └── +esm.js │ │ │ ├── d3-shape@3.2.0 │ │ │ └── +esm.js │ │ │ ├── d3-time-format@4.1.0 │ │ │ └── +esm.js │ │ │ ├── d3-time@3.1.0 │ │ │ └── +esm.js │ │ │ ├── d3-timer@3.0.1 │ │ │ └── +esm.js │ │ │ ├── delaunator@5.0.1 │ │ │ └── +esm.js │ │ │ ├── fast-deep-equal@3.1.3 │ │ │ └── +esm.js │ │ │ ├── fast-json-stable-stringify@2.1.0 │ │ │ └── +esm.js │ │ │ ├── internmap@2.0.3 │ │ │ └── +esm.js │ │ │ ├── json-stringify-pretty-compact@4.0.0 │ │ │ └── +esm.js │ │ │ ├── lodash.debounce@4.0.8 │ │ │ └── +esm.js │ │ │ ├── robust-predicates@3.0.2 │ │ │ └── +esm.js │ │ │ ├── topojson-client@3.1.0 │ │ │ └── +esm.js │ │ │ ├── vega-canvas@2.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-crossfilter@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-dataflow@6.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-embed@7.0.2 │ │ │ └── +esm.js │ │ │ ├── vega-encode@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-event-selector@4.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-expression@6.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-force@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-format@2.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-functions@6.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-geo@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-hierarchy@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-interpreter@2.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-label@2.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-lite@5.14.1 │ │ │ └── +esm.js │ │ │ ├── vega-lite@5.15.1 │ │ │ └── +esm.js │ │ │ ├── vega-lite@5.16.3 │ │ │ └── +esm.js │ │ │ ├── vega-lite@5.17.0 │ │ │ └── +esm.js │ │ │ ├── vega-lite@5.19.0 │ │ │ └── +esm.js │ │ │ ├── vega-lite@5.20.1 │ │ │ └── +esm.js │ │ │ ├── vega-lite@5.21.0 │ │ │ └── +esm.js │ │ │ ├── vega-lite@5.8.0 │ │ │ └── +esm.js │ │ │ ├── vega-lite@6.1.0 │ │ │ └── +esm.js │ │ │ ├── vega-loader@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-parser@7.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-projection@2.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-regression@2.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-runtime@7.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-scale@8.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-scenegraph@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-schema-url-parser@3.0.2 │ │ │ └── +esm.js │ │ │ ├── vega-selections@6.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-statistics@2.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-themes@3.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-time@3.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-tooltip@1.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-transforms@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-util@2.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-view-transforms@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-view@6.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-voronoi@5.0.0 │ │ │ └── +esm.js │ │ │ ├── vega-wordcloud@5.0.0 │ │ │ └── +esm.js │ │ │ └── vega@6.1.2 │ │ │ └── +esm.js │ └── import_map.json └── vendor_imports.js ├── vl-convert-vendor ├── Cargo.toml ├── LICENSE ├── README.md ├── patched │ └── cdn.skypack.dev │ │ └── - │ │ └── vega-scenegraph@v4.10.2-W1dltMWN7mO3TARazJA1 │ │ └── dist=es2020,mode=imports,min │ │ └── optimized │ │ ├── README.md │ │ └── vega-scenegraph.js └── src │ └── main.rs └── vl-convert ├── Cargo.toml ├── LICENSE ├── README.md ├── src └── main.rs ├── tests └── test_cli.rs ├── thirdparty_font.md ├── thirdparty_javascript.md └── thirdparty_rust.yaml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Always checkout files with \n line endings (even on Windows) 2 | * -text 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: monthly 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /target 3 | /vl-convert-rs/tests/output/ 4 | 5 | __pycache__/ 6 | .pytest_cache/ 7 | *.py[cod] 8 | 9 | .DS_Store 10 | /vl-convert-rs/imports.js 11 | /dist/ 12 | /vl-convert-python/notebooks/.ipynb_checkpoints/ 13 | /vl-convert-python/notebooks/output/ 14 | /vl-convert/tests/output/ 15 | /vl-convert-rs/tests/vl-specs/failed/ 16 | 17 | .pixi/ 18 | 19 | scratch/ 20 | 21 | # File generated to check for 22 | CI.yaml -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" # Needed for proper wgpu compilation 3 | 4 | members = [ 5 | "vl-convert-rs", 6 | "vl-convert", 7 | "vl-convert-python", 8 | "vl-convert-vendor" 9 | ] 10 | 11 | [profile.release] 12 | strip = true # Automatically strip symbols from the binary 13 | opt-level = "z" # Optimize for size 14 | # Disable LTO on Linux due to fix ring linker errors 15 | lto = false 16 | codegen-units = 1 17 | 18 | [workspace.dependencies] 19 | anyhow = "1.0" 20 | assert_cmd = "2.0" 21 | clap = { version = "4.5", features = ["derive"] } 22 | 23 | # Deno crates that correspond to 1.46.3 24 | deno_core = "0.307.0" 25 | deno_emit = "0.44.0" 26 | deno_graph = "0.81.3" 27 | deno_runtime = "0.177.0" 28 | 29 | dircpy = "0.3" 30 | dssim = "3.2.4" 31 | env_logger = "0.11.8" 32 | fontdb = { version = "0.23.0", features = ["fontconfig"] } 33 | futures = "0.3.30" 34 | futures-util = "0.3.30" 35 | image = { version = "0.25", default-features = false, features = ["jpeg"] } 36 | itertools = "0.14.0" 37 | lazy_static = "1.4.0" 38 | log = "0.4.20" 39 | lz-str = "0.2.1" 40 | png = "0.17.13" 41 | predicates = "3.0.2" 42 | pyo3 = { version = "0.25.0", features = ["extension-module", "anyhow", "abi3-py37"] } 43 | pythonize = "0.25.0" 44 | regex = "1" 45 | reqwest = { version = "0.11.20", default-features = false, features = ["rustls-tls"] } 46 | resvg = "0.45.1" 47 | rstest = "0.25.0" 48 | semver = "1.0.20" 49 | serde = { version = "1.0.188", features = ["derive"] } 50 | serde_json = "1.0.106" 51 | shellexpand = "3.1.0" 52 | svg2pdf = "0.13.0" 53 | tempfile = "3.8.0" 54 | tiny-skia = "0.11.4" 55 | tokio = { version = "1.36", features = ["macros", "rt-multi-thread"] } 56 | ttf-parser = "0.25.1" 57 | usvg = "0.45.1" 58 | zip-extract = "0.4.0" 59 | -------------------------------------------------------------------------------- /DEVELOP.md: -------------------------------------------------------------------------------- 1 | # Devlopment 2 | The vl-convert project consists of both Rust and Python components. The project uses [Pixi](https://pixi.sh/latest/) to manage the development environment. Pixi handles the installation of all the development dependencies including Python and Rust themselves. If you don't have Pixi installed, follow the instructions at https://pixi.sh/ 3 | 4 | # Running Rust tests 5 | Once pixi is installed, you can run the various test suites using Pixi commands. 6 | 7 | ```bash 8 | pixi run test-rs # Core Rust tests 9 | pixi run test-cli # Tests for the CLI interface 10 | ``` 11 | 12 | # Running Python tests 13 | First build the Python library in development mode so that it is present in the pixi environment 14 | ```bash 15 | pixi run dev-py 16 | ``` 17 | 18 | Then run the Python tests 19 | 20 | ```bash 21 | pixi run test-py 22 | ``` 23 | 24 | # Debug Logging 25 | To enable logging, set the RUST_LOG environment variable to info, warn, or error 26 | ``` 27 | RUST_LOG=info 28 | ``` 29 | 30 | # Updating Licenses 31 | vl-convert uses the `cargo bundle-licenses` to bundle the licenses of its Rust dependencies for inclusion in Python packages. When a Rust dependency is changed, rebuild the license files with 32 | 33 | ```bash 34 | pixi run bundle-licenses 35 | ``` 36 | 37 | If the generated license files are out of date, 38 | 39 | # Build wheels 40 | 41 | You can build the Python wheel for your architecture with the `build-py` Pixi task 42 | 43 | ```bash 44 | pixi run build-py 45 | ``` 46 | 47 | # Vendor JavaScript Dependencies 48 | vl-convert embeds vendored copies of all the JavaScript libraries it uses. The `vendor` Pixi task performs this 49 | download 50 | 51 | ```bash 52 | pixi run vendor 53 | ``` 54 | 55 | For more information on the vendoring process, see [vl-convert-vendor/README.md](vl-convert-vendor/README.md). 56 | 57 | # Release process 58 | Releases of VlConvert crates are handled using [cargo-workspaces](https://github.com/pksunkara/cargo-workspaces), which can be installed with: 59 | 60 | ```bash 61 | pixi shell 62 | cargo install cargo-workspaces 63 | ``` 64 | 65 | ## Tagging and publish to crates.io 66 | Check out the main branch, then tag and publish a new version of the `vl-convert` and `vl-convert-rs` crates with: 67 | 68 | (replacing `0.1.0` with the desired version) 69 | 70 | ```bash 71 | pixi shell 72 | cargo ws publish --all --force "vl-convert*" custom 0.1.0 73 | ``` 74 | 75 | ## Publish Python packages to PyPI 76 | The `cargo ws publish ...` command above will push a commit to the `main` branch. This push to `main` will trigger CI, including the "Publish to PyPI" job. This job must be approved manually in the GitHub interface. After it is approved it will run and publish the Python packages to PyPI. 77 | 78 | ## Create GitHub Release 79 | Create a new GitHub release using the `v0.1.0` tag. 80 | 81 | 82 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2023 Jon Mease 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /binder/requirements.txt: -------------------------------------------------------------------------------- 1 | vl-convert-python >=0.3.0 2 | altair 3 | vega-datasets 4 | -------------------------------------------------------------------------------- /pixi.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "vl-convert" 3 | # This version is not used for publishing packages and doesn't need to be kept in sync 4 | version = "0.0.1" 5 | description = "Dependency free static image export for Vega and Vega-Lite" 6 | authors = ["Jon Mease "] 7 | channels = ["conda-forge"] 8 | platforms = ["osx-arm64", "osx-64", "win-64", "linux-64"] 9 | 10 | [system-requirements] 11 | macos = "12.0" 12 | 13 | [tasks] 14 | dev-py = "maturin develop -m vl-convert-python/Cargo.toml" 15 | test-py = { cmd = ["pytest", "vl-convert-python/tests"]} 16 | test-cli = "cargo test -p vl-convert" 17 | test-rs = "cargo test -p vl-convert-rs -- --test-threads=1" 18 | 19 | fmt-py = "black vl-convert-python" 20 | fmt-py-check = "black vl-convert-python --check" 21 | fmt-rs = "cargo fmt --all" 22 | fmt-rs-check = "cargo fmt --all -- --check" 23 | 24 | check-rs = "cargo check --tests" 25 | clippy = "cargo clippy" 26 | 27 | build-rs = "cargo build -p vl-convert-rs" 28 | build-cli = "cargo build -p vl-convert" 29 | build-py = "maturin build -m vl-convert-python/Cargo.toml --sdist --release" 30 | 31 | vendor = "cargo run -p vl-convert-vendor" 32 | bundle-licenses = """ 33 | cargo install cargo-bundle-licenses && 34 | cargo bundle-licenses --format yaml --output thirdparty_rust.yaml && 35 | cp thirdparty_*.* vl-convert-python/ && 36 | cp thirdparty_*.* vl-convert-rs/ && 37 | cp thirdparty_*.* vl-convert/ 38 | """ 39 | 40 | [pypi-dependencies] 41 | pypdfium2 = ">=4.30.0, <5" 42 | 43 | # Development Dependencies 44 | [dependencies] 45 | python = "3.11.*" 46 | maturin = "1.8.*" 47 | pytest = ">=8.2.2,<8.3" 48 | rust = "1.87.*" 49 | scikit-image = ">=0.23.2,<0.24" 50 | deno = ">=1.46.3,<2" 51 | protobuf = ">=4.25.3,<5" 52 | black = ">=24.8.0,<25" 53 | pip = ">=24.2,<25" 54 | 55 | # macOS 15.4 tightened the dynamic-loader rules and now rejects binaries 56 | # with duplicate LC_RPATH entries. Older conda-forge builds of OpenBLAS / 57 | # libgfortran trigger this, which breaks NumPy & SciPy imports on Apple Silicon 58 | # (see prefix-dev/pixi#3479, conda-forge/libgfortran-feedstock#69, 59 | # conda-forge/openblas-feedstock#196). Pinning libgfortran5 to ≥ 14 pulls in 60 | # the rebuilt runtime that removes the duplicate RPATH and fixes the error. 61 | libgfortran5 = ">=14.0.0" 62 | 63 | # Dependencies not required for development or testing, 64 | # but useful when trying out vl-convert-python by hand 65 | altair = ">=5.3.0,<5.4" 66 | vega_datasets = ">=0.9.0,<0.10" 67 | altair_tiles = ">=0.3.0,<0.4" 68 | geopandas = ">=0.14.3,<0.15" 69 | jupyterlab = ">=4.0.11,<4.1" 70 | libffi = ">=3.4.6,<4" 71 | -------------------------------------------------------------------------------- /thirdparty_javascript.md: -------------------------------------------------------------------------------- 1 | ## array-flat-polyfill 2 | License: CC0-1.0 3 | Source: https://github.com/jonathantneal/array-flat-polyfill 4 | 5 | ## clone 6 | License: MIT 7 | Source: https://github.com/pvorb/clone 8 | 9 | ## d3 10 | License: ISC 11 | Source: https://github.com/d3/d3 12 | 13 | ## delaunator 14 | License: ISC 15 | Source: https://github.com/mapbox/delaunator 16 | 17 | ## fast-deep-equal 18 | License: MIT 19 | Source: https://github.com/epoberezkin/fast-deep-equal 20 | 21 | ## fast-json-stable-stringify 22 | License: MIT 23 | Source: https://github.com/epoberezkin/fast-json-stable-stringify 24 | 25 | ## internmap 26 | License: ISC 27 | Source: https://github.com/mbostock/internmap 28 | 29 | ## robust-predicates 30 | License: Unlicense 31 | Source: https://github.com/mourner/robust-predicates 32 | 33 | ## topojson-client 34 | License: ISC 35 | Source: https://github.com/topojson/topojson-client 36 | 37 | ## vega-lite 38 | License: BSD-3-Clause 39 | Source: https://github.com/vega/vega-lite 40 | 41 | ## vega 42 | License: BSD-3-Clause 43 | Source: https://github.com/vega/vega -------------------------------------------------------------------------------- /vl-convert-python/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vl-convert-python" 3 | version = "1.8.0" 4 | edition = "2021" 5 | license = "BSD-3-Clause" 6 | readme = "README.md" 7 | homepage = "https://github.com/jonmmease/vl-convert" 8 | repository = "https://github.com/jonmmease/vl-convert" 9 | publish = false 10 | 11 | [package.metadata.release] 12 | release = false 13 | 14 | [lib] 15 | name = "vl_convert" 16 | crate-type = ["cdylib"] 17 | 18 | [dependencies] 19 | vl-convert-rs = { path = "../vl-convert-rs", version = "1.7.0" } 20 | pyo3 = { workspace = true } 21 | lazy_static = { workspace = true } 22 | futures = { workspace = true } 23 | pythonize = { workspace = true } 24 | tokio = { workspace = true } 25 | -------------------------------------------------------------------------------- /vl-convert-python/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2023 Jon Mease 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /vl-convert-python/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["maturin>=1.1.0,<2"] 3 | build-backend = "maturin" 4 | 5 | [project] 6 | name = "vl-convert-python" 7 | dynamic = ["version"] 8 | requires-python = ">=3.7" 9 | description = "Convert Vega-Lite chart specifications to SVG, PNG, or Vega" 10 | classifiers = [ 11 | "Programming Language :: Rust", 12 | "Programming Language :: Python :: Implementation :: CPython", 13 | ] 14 | 15 | [tool.maturin] 16 | sdist-include = ["*_thirdparty.*"] 17 | 18 | [tool.ruff] 19 | target-version = "py38" 20 | line-length = 88 21 | indent-width = 4 22 | exclude = [] 23 | include = ["vl_convert.pyi"] 24 | 25 | [tool.ruff.format] 26 | quote-style = "double" 27 | indent-style = "space" 28 | skip-magic-trailing-comma = true 29 | line-ending = "lf" 30 | # https://docs.astral.sh/ruff/formatter/#docstring-formatting 31 | docstring-code-format = true 32 | docstring-code-line-length = 88 33 | 34 | [tool.ruff.lint] 35 | # https://docs.astral.sh/ruff/preview/ 36 | preview = true 37 | 38 | # https://docs.astral.sh/ruff/settings/#lint_extend-safe-fixes 39 | extend-safe-fixes = [ 40 | # from __future__ import annotations # 41 | # ---------------------------------- # 42 | "UP006", 43 | "UP007", 44 | "UP008", 45 | "TCH", 46 | # unsorted-dunder-all 47 | "RUF022", 48 | # pydocstyle # 49 | # ---------- # 50 | # fits-on-one-line 51 | "D200", 52 | # escape-sequence-in-docstring 53 | "D301", 54 | # ends-in-period 55 | "D400", 56 | ] 57 | extend-select = [ 58 | "ANN", 59 | "D", 60 | "D213", 61 | "D400", 62 | "E", 63 | "F", 64 | "FA", 65 | "I001", 66 | "RUF", 67 | "TCH", 68 | "TID", 69 | "UP", 70 | "W", 71 | ] 72 | ignore = [ 73 | # indent-with-spaces 74 | "D206", 75 | # multi-line-summary-first-line ((D213) is the opposite of this) 76 | "D212", 77 | # Line too long 78 | "E501", 79 | ] 80 | pydocstyle.convention = "numpy" 81 | isort.split-on-trailing-comma = false 82 | 83 | [tool.pyright] 84 | pythonPlatform="All" 85 | pythonVersion="3.8" -------------------------------------------------------------------------------- /vl-convert-python/tests/test_get_local_tz.py: -------------------------------------------------------------------------------- 1 | import vl_convert as vlc 2 | 3 | 4 | def test_get_local_tz_is_str_or_none(): 5 | # Just check that get_local_tz runs and returns a string or None 6 | local_tz = vlc.get_local_tz() 7 | assert isinstance(local_tz, str) or local_tz is None 8 | -------------------------------------------------------------------------------- /vl-convert-python/tests/test_get_locales.py: -------------------------------------------------------------------------------- 1 | import vl_convert as vlc 2 | 3 | 4 | def test_get_format_locale(): 5 | format_locale = vlc.get_format_locale("it-IT") 6 | assert format_locale == { 7 | "currency": ["€", ""], 8 | "decimal": ",", 9 | "grouping": [3], 10 | "thousands": ".", 11 | } 12 | 13 | 14 | def test_get_time_format_locale(): 15 | format_locale = vlc.get_time_format_locale("it-IT") 16 | assert format_locale == { 17 | "date": "%d/%m/%Y", 18 | "dateTime": "%A %e %B %Y, %X", 19 | "days": [ 20 | "Domenica", 21 | "Lunedì", 22 | "Martedì", 23 | "Mercoledì", 24 | "Giovedì", 25 | "Venerdì", 26 | "Sabato", 27 | ], 28 | "months": [ 29 | "Gennaio", 30 | "Febbraio", 31 | "Marzo", 32 | "Aprile", 33 | "Maggio", 34 | "Giugno", 35 | "Luglio", 36 | "Agosto", 37 | "Settembre", 38 | "Ottobre", 39 | "Novembre", 40 | "Dicembre", 41 | ], 42 | "periods": ["AM", "PM"], 43 | "shortDays": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], 44 | "shortMonths": [ 45 | "Gen", 46 | "Feb", 47 | "Mar", 48 | "Apr", 49 | "Mag", 50 | "Giu", 51 | "Lug", 52 | "Ago", 53 | "Set", 54 | "Ott", 55 | "Nov", 56 | "Dic", 57 | ], 58 | "time": "%H:%M:%S", 59 | } 60 | -------------------------------------------------------------------------------- /vl-convert-python/tests/test_themes.py: -------------------------------------------------------------------------------- 1 | import vl_convert as vlc 2 | 3 | 4 | def test_get_themes_dark_theme_background(): 5 | themes = vlc.get_themes() 6 | assert isinstance(themes, dict) 7 | dark = themes["dark"] 8 | assert isinstance(dark, dict) 9 | background = dark["background"] 10 | assert background == "#333" 11 | -------------------------------------------------------------------------------- /vl-convert-python/thirdparty_javascript.md: -------------------------------------------------------------------------------- 1 | ## array-flat-polyfill 2 | License: CC0-1.0 3 | Source: https://github.com/jonathantneal/array-flat-polyfill 4 | 5 | ## clone 6 | License: MIT 7 | Source: https://github.com/pvorb/clone 8 | 9 | ## d3 10 | License: ISC 11 | Source: https://github.com/d3/d3 12 | 13 | ## delaunator 14 | License: ISC 15 | Source: https://github.com/mapbox/delaunator 16 | 17 | ## fast-deep-equal 18 | License: MIT 19 | Source: https://github.com/epoberezkin/fast-deep-equal 20 | 21 | ## fast-json-stable-stringify 22 | License: MIT 23 | Source: https://github.com/epoberezkin/fast-json-stable-stringify 24 | 25 | ## internmap 26 | License: ISC 27 | Source: https://github.com/mbostock/internmap 28 | 29 | ## robust-predicates 30 | License: Unlicense 31 | Source: https://github.com/mourner/robust-predicates 32 | 33 | ## topojson-client 34 | License: ISC 35 | Source: https://github.com/topojson/topojson-client 36 | 37 | ## vega-lite 38 | License: BSD-3-Clause 39 | Source: https://github.com/vega/vega-lite 40 | 41 | ## vega 42 | License: BSD-3-Clause 43 | Source: https://github.com/vega/vega -------------------------------------------------------------------------------- /vl-convert-rs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vl-convert-rs" 3 | version = "1.8.0" 4 | edition = "2021" 5 | license = "BSD-3-Clause" 6 | readme = "README.md" 7 | homepage = "https://github.com/jonmmease/vl-convert" 8 | repository = "https://github.com/jonmmease/vl-convert" 9 | description = "Library for converting Vega-Lite visualization specifications to Vega specifications" 10 | keywords = ["Visualization", "Vega", "Vega-Lite"] 11 | 12 | [dependencies] 13 | deno_runtime = { workspace = true } 14 | deno_core = { workspace = true } 15 | deno_emit = { workspace = true } 16 | deno_graph = { workspace = true } 17 | serde = { workspace = true } 18 | futures = { workspace = true } 19 | futures-util = { workspace = true } 20 | reqwest = { workspace = true } 21 | usvg = { workspace = true } 22 | resvg = { workspace = true } 23 | tiny-skia = { workspace = true } 24 | svg2pdf = { workspace = true } 25 | ttf-parser = { workspace = true } 26 | png = { workspace = true } 27 | fontdb = { workspace = true } 28 | log = { workspace = true } 29 | env_logger = { workspace = true } 30 | image = { workspace = true } 31 | lz-str = { workspace = true } 32 | regex = { workspace = true } 33 | tokio = { workspace = true } 34 | serde_json = { workspace = true } 35 | tempfile = { workspace = true } 36 | lazy_static = { workspace = true } 37 | 38 | [dev-dependencies] 39 | rstest = { workspace = true } 40 | dssim = { workspace = true } 41 | 42 | # For macOS 15 "Sequoia" with Xcode 16: 43 | # The version of libffi-rs that is pulled in by deno_core still pulls in 44 | # libffi-sys 2.3.0, whose AArch64 assembly triggers "invalid CFI 45 | # advance_loc expression” errors with Apple’s LLVM 17 assembler. 46 | # Upstream fixed the CFI directives in **libffi 3.4.7** (see libffi/libffi #852) 47 | # and the breakage is tracked in libffi-rs #109. But we can't update this without 48 | # updating deno_core. Instead, we link against a system 49 | # libffi (≥ 3.4.x) by enabling the `system` feature below. 50 | # This system version is installed using pixi. 51 | # [oai_citation:0‡GitHub](https://github.com/libffi/libffi/issues/852) 52 | [target.'cfg(target_os = "macos")'.dependencies.libffi] 53 | version = "^3.2.0" 54 | features = ["system"] 55 | -------------------------------------------------------------------------------- /vl-convert-rs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2023 Jon Mease 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /vl-convert-rs/README.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | This crate provides a self-contained Rust library for converting [Vega-Lite](https://vega.github.io/vega-lite/) visualization specifications into various formats. The conversions are performed using the Vega-Lite and Vega JavaScript libraries running in a v8 JavaScript runtime provided by the [`deno_runtime`](https://crates.io/crates/deno_runtime) crate. 3 | 4 | This crate is a dependency of the [`vl-convert`](https://crates.io/crates/vl-convert) CLI application crate and the [`vl-convert-python`](https://pypi.org/project/vl-convert-python/) Python library. 5 | 6 | ## Example 7 | The [`VlConverter`] struct may be used to perform various Vega-Lite conversions. See the documentation of [`VlConverter`] for example usage. 8 | 9 | ## JavaScript Vendoring and Code Generation 10 | Note: The `vl-convert-rs/vendor` directory and `vl-convert-rs/src/module_loader/import_map.rs` file in this crate are generated by the internal [`vl-convert-vendor`](https://github.com/jonmmease/vl-convert/tree/main/vl-convert-vendor) crate. 11 | -------------------------------------------------------------------------------- /vl-convert-rs/examples/conversion1.rs: -------------------------------------------------------------------------------- 1 | use vl_convert_rs::converter::VlOpts; 2 | use vl_convert_rs::{VlConverter, VlVersion}; 3 | 4 | #[tokio::main] 5 | async fn main() { 6 | let mut converter = VlConverter::new(); 7 | 8 | let vl_spec: serde_json::Value = serde_json::from_str( 9 | r#" 10 | { 11 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 12 | "data": {"url": "data/movies.json"}, 13 | "mark": "circle", 14 | "encoding": { 15 | "x": { 16 | "bin": {"maxbins": 10}, 17 | "field": "IMDB Rating" 18 | }, 19 | "y": { 20 | "bin": {"maxbins": 10}, 21 | "field": "Rotten Tomatoes Rating" 22 | }, 23 | "size": {"aggregate": "count"} 24 | } 25 | } "#, 26 | ) 27 | .unwrap(); 28 | 29 | let vega_spec = converter 30 | .vegalite_to_vega( 31 | vl_spec, 32 | VlOpts { 33 | vl_version: VlVersion::v5_8, 34 | ..Default::default() 35 | }, 36 | ) 37 | .await 38 | .expect("Failed to perform Vega-Lite to Vega conversion"); 39 | 40 | println!("{}", vega_spec) 41 | } 42 | -------------------------------------------------------------------------------- /vl-convert-rs/fonts/liberation-sans/LiberationSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/fonts/liberation-sans/LiberationSans-Bold.ttf -------------------------------------------------------------------------------- /vl-convert-rs/fonts/liberation-sans/LiberationSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/fonts/liberation-sans/LiberationSans-BoldItalic.ttf -------------------------------------------------------------------------------- /vl-convert-rs/fonts/liberation-sans/LiberationSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/fonts/liberation-sans/LiberationSans-Italic.ttf -------------------------------------------------------------------------------- /vl-convert-rs/fonts/liberation-sans/LiberationSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/fonts/liberation-sans/LiberationSans-Regular.ttf -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-001.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", ""], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-AE.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u062f\u002e\u0625\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-BH.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u062f\u002e\u0628\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-DJ.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["\u200f\u0046\u0064\u006a ", ""], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-DZ.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u002c", 3 | "thousands": "\u002e", 4 | "grouping": [3], 5 | "currency": ["\u062f\u002e\u062c\u002e ", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-EG.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u062c\u002e\u0645\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-EH.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u002e", 3 | "thousands": "\u002c", 4 | "grouping": [3], 5 | "currency": ["\u062f\u002e\u0645\u002e ", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-ER.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["\u004e\u0066\u006b ", ""], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-IL.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["\u20aa ", ""], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-IQ.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u062f\u002e\u0639\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-JO.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u062f\u002e\u0623\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-KM.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u0641\u002e\u062c\u002e\u0642\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-KW.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u062f\u002e\u0643\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-LB.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u0644\u002e\u0644\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-LY.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u002c", 3 | "thousands": "\u002e", 4 | "grouping": [3], 5 | "currency": ["\u062f\u002e\u0644\u002e ", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-MA.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u002c", 3 | "thousands": "\u002e", 4 | "grouping": [3], 5 | "currency": ["\u062f\u002e\u0645\u002e ", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-MR.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u0623\u002e\u0645\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-OM.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u0631\u002e\u0639\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-PS.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["\u20aa ", ""], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-QA.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u0631\u002e\u0642\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-SA.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u0631\u002e\u0633\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-SD.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u062c\u002e\u0633\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-SO.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["\u200f\u0053 ", ""], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-SS.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["\u00a3 ", ""], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-SY.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u0644\u002e\u0633\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-TD.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["\u200f\u0046\u0043\u0046\u0041 ", ""], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-TN.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u002c", 3 | "thousands": "\u002e", 4 | "grouping": [3], 5 | "currency": ["\u062f\u002e\u062a\u002e ", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ar-YE.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": "\u066b", 3 | "thousands": "\u066c", 4 | "grouping": [3], 5 | "currency": ["", " \u0631\u002e\u0649\u002e"], 6 | "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ca-ES.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0€"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/cs-CZ.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0Kč"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/da-DK.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["", " kr"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/de-CH.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "'", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0CHF"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/de-DE.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0€"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/en-CA.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["$", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/en-GB.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["£", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/en-IE.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["€", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/en-IN.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3, 2, 2, 2, 2, 2, 2, 2, 2, 2], 5 | "currency": ["₹", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["$", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/es-BO.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["Bs\u00a0", ""], 6 | "percent": "\u202f%" 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/es-ES.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0€"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/es-MX.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["$", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/fi-FI.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0€"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/fr-CA.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", "$"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/fr-FR.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0€"], 6 | "percent": "\u202f%" 7 | } 8 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/he-IL.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["₪", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/hu-HU.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0Ft"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/it-IT.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["€", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ja-JP.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["", "円"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ko-KR.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["₩", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/mk-MK.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0ден."] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/nl-NL.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["€\u00a0", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/pl-PL.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["", "zł"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/pt-BR.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["R$", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/pt-PT.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0€"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/ru-RU.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0\u20bd"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/sl-SI.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0€"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/sv-SE.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", " kr"] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/uk-UA.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": "\u00a0", 4 | "grouping": [3], 5 | "currency": ["", "\u00a0₴."] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/format/zh-CN.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ".", 3 | "thousands": ",", 4 | "grouping": [3], 5 | "currency": ["¥", ""] 6 | } 7 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/ar-EG.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%x, %X", 3 | "date": "%-d/%-m/%Y", 4 | "time": "%-I:%M:%S %p", 5 | "periods": ["ص", "م"], 6 | "days": ["الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"], 7 | "shortDays": ["أحد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"], 8 | "months": ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], 9 | "shortMonths": ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/ar-SY.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%x, %X", 3 | "date": "%-d/%-m/%Y", 4 | "time": "%-I:%M:%S %p", 5 | "periods": ["ص", "م"], 6 | "days": ["الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"], 7 | "shortDays": ["أحد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"], 8 | "months": ["كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"], 9 | "shortMonths": ["ك٢", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "ت١", "ت٢", "ك١"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/ca-ES.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e de %B de %Y, %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"], 7 | "shortDays": ["dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."], 8 | "months": ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"], 9 | "shortMonths": ["gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des."] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/cs-CZ.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A,%e.%B %Y, %X", 3 | "date": "%-d.%-m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["neděle", "pondělí", "úterý", "středa", "čvrtek", "pátek", "sobota"], 7 | "shortDays": ["ne.", "po.", "út.", "st.", "čt.", "pá.", "so."], 8 | "months": ["leden", "únor", "březen", "duben", "květen", "červen", "červenec", "srpen", "září", "říjen", "listopad", "prosinec"], 9 | "shortMonths": ["led", "úno", "břez", "dub", "kvě", "čer", "červ", "srp", "zář", "říj", "list", "pros"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/da-DK.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A den %d %B %Y %X", 3 | "date": "%d-%m-%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"], 7 | "shortDays": ["søn", "man", "tir", "ons", "tor", "fre", "lør"], 8 | "months": ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"], 9 | "shortMonths": ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/de-CH.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, der %e. %B %Y, %X", 3 | "date": "%d.%m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], 7 | "shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], 8 | "months": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], 9 | "shortMonths": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/de-DE.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, der %e. %B %Y, %X", 3 | "date": "%d.%m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], 7 | "shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], 8 | "months": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], 9 | "shortMonths": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/en-CA.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%a %b %e %X %Y", 3 | "date": "%Y-%m-%d", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 7 | "shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 8 | "months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 9 | "shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/en-GB.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%a %e %b %X %Y", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 7 | "shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 8 | "months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 9 | "shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%x, %X", 3 | "date": "%-m/%-d/%Y", 4 | "time": "%-I:%M:%S %p", 5 | "periods": ["AM", "PM"], 6 | "days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 7 | "shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 8 | "months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], 9 | "shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/es-ES.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e de %B de %Y, %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], 7 | "shortDays": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"], 8 | "months": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], 9 | "shortMonths": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/es-MX.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%x, %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%-I:%M:%S %p", 5 | "periods": ["AM", "PM"], 6 | "days": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], 7 | "shortDays": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"], 8 | "months": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], 9 | "shortMonths": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/fa-IR.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%x, %X", 3 | "date": "%-d/%-m/%Y", 4 | "time": "%-I:%M:%S %p", 5 | "periods": ["صبح", "عصر"], 6 | "days": ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"], 7 | "shortDays": ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"], 8 | "months": ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"], 9 | "shortMonths": ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/fi-FI.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %-d. %Bta %Y klo %X", 3 | "date": "%-d.%-m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["a.m.", "p.m."], 6 | "days": ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"], 7 | "shortDays": ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"], 8 | "months": ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], 9 | "shortMonths": ["Tammi", "Helmi", "Maalis", "Huhti", "Touko", "Kesä", "Heinä", "Elo", "Syys", "Loka", "Marras", "Joulu"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/fr-CA.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%a %e %b %Y %X", 3 | "date": "%Y-%m-%d", 4 | "time": "%H:%M:%S", 5 | "periods": ["", ""], 6 | "days": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], 7 | "shortDays": ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"], 8 | "months": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], 9 | "shortMonths": ["jan", "fév", "mar", "avr", "mai", "jui", "jul", "aoû", "sep", "oct", "nov", "déc"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/fr-FR.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A %e %B %Y à %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], 7 | "shortDays": ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], 8 | "months": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], 9 | "shortMonths": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/he-IL.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e ב%B %Y %X", 3 | "date": "%d.%m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"], 7 | "shortDays": ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"], 8 | "months": ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], 9 | "shortMonths": ["ינו׳", "פבר׳", "מרץ", "אפר׳", "מאי", "יוני", "יולי", "אוג׳", "ספט׳", "אוק׳", "נוב׳", "דצמ׳"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/hr-HR.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e. %B %Y., %X", 3 | "date": "%d. %m. %Y.", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvtrak", "Petak", "Subota"], 7 | "shortDays": ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], 8 | "months": ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], 9 | "shortMonths": ["Sij", "Velj", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/hu-HU.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%Y. %B %-e., %A %X", 3 | "date": "%Y. %m. %d.", 4 | "time": "%H:%M:%S", 5 | "periods": ["de.", "du."], 6 | "days": ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"], 7 | "shortDays": ["V", "H", "K", "Sze", "Cs", "P", "Szo"], 8 | "months": ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"], 9 | "shortMonths": ["jan.", "feb.", "már.", "ápr.", "máj.", "jún.", "júl.", "aug.", "szept.", "okt.", "nov.", "dec."] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/it-IT.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A %e %B %Y, %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], 7 | "shortDays": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], 8 | "months": ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], 9 | "shortMonths": ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/ja-JP.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%x %a %X", 3 | "date": "%Y/%m/%d", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"], 7 | "shortDays": ["日", "月", "火", "水", "木", "金", "土"], 8 | "months": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], 9 | "shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/ko-KR.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%Y/%m/%d %a %X", 3 | "date": "%Y/%m/%d", 4 | "time": "%H:%M:%S", 5 | "periods": ["오전", "오후"], 6 | "days": ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], 7 | "shortDays": ["일", "월", "화", "수", "목", "금", "토"], 8 | "months": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], 9 | "shortMonths": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/mk-MK.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e %B %Y г. %X", 3 | "date": "%d.%m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["недела", "понеделник", "вторник", "среда", "четврток", "петок", "сабота"], 7 | "shortDays": ["нед", "пон", "вто", "сре", "чет", "пет", "саб"], 8 | "months": ["јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"], 9 | "shortMonths": ["јан", "фев", "мар", "апр", "мај", "јун", "јул", "авг", "сеп", "окт", "ное", "дек"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/nb-NO.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A den %d. %B %Y %X", 3 | "date": "%d.%m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"], 7 | "shortDays": ["søn", "man", "tir", "ons", "tor", "fre", "lør"], 8 | "months": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"], 9 | "shortMonths": ["jan", "feb", "mars", "apr", "mai", "juni", "juli", "aug", "sep", "okt", "nov", "des"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/nl-BE.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%a %e %B %Y %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], 7 | "shortDays": ["zo", "ma", "di", "wo", "do", "vr", "za"], 8 | "months": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], 9 | "shortMonths": ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/nl-NL.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%a %e %B %Y %X", 3 | "date": "%d-%m-%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], 7 | "shortDays": ["zo", "ma", "di", "wo", "do", "vr", "za"], 8 | "months": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], 9 | "shortMonths": ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/pl-PL.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e %B %Y, %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"], 7 | "shortDays": ["Niedz.", "Pon.", "Wt.", "Śr.", "Czw.", "Pt.", "Sob."], 8 | "months": ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], 9 | "shortMonths": ["Stycz.", "Luty", "Marz.", "Kwie.", "Maj", "Czerw.", "Lipc.", "Sierp.", "Wrz.", "Paźdz.", "Listop.", "Grudz."] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/pt-BR.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e de %B de %Y. %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], 7 | "shortDays": ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], 8 | "months": ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], 9 | "shortMonths": ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/ru-RU.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e %B %Y г. %X", 3 | "date": "%d.%m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"], 7 | "shortDays": ["вс", "пн", "вт", "ср", "чт", "пт", "сб"], 8 | "months": ["января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"], 9 | "shortMonths": ["янв", "фев", "мар", "апр", "май", "июн", "июл", "авг", "сен", "окт", "ноя", "дек"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/sv-SE.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A den %d %B %Y %X", 3 | "date": "%Y-%m-%d", 4 | "time": "%H:%M:%S", 5 | "periods": ["fm", "em"], 6 | "days": ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"], 7 | "shortDays": ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"], 8 | "months": ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], 9 | "shortMonths": ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/tr-TR.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%a %e %b %X %Y", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"], 7 | "shortDays": ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"], 8 | "months": ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], 9 | "shortMonths": ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/uk-UA.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A, %e %B %Y р. %X", 3 | "date": "%d.%m.%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["дп", "пп"], 6 | "days": ["неділя", "понеділок", "вівторок", "середа", "четвер", "п'ятниця", "субота"], 7 | "shortDays": ["нд", "пн", "вт", "ср", "чт", "пт", "сб"], 8 | "months": ["січня", "лютого", "березня", "квітня", "травня", "червня", "липня", "серпня", "вересня", "жовтня", "листопада", "грудня"], 9 | "shortMonths": ["січ.", "лют.", "бер.", "квіт.", "трав.", "черв.", "лип.", "серп.", "вер.", "жовт.", "лист.", "груд."] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/vi-VN.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%a, %e %b, %Y %H:%M", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"], 7 | "shortDays": ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"], 8 | "months": ["Tháng một", "Tháng hai", "Tháng ba", "Tháng tư", "Tháng năm", "Tháng sáu", "Tháng bảy", "Tháng tám", "Tháng chín", "Tháng mười", "Tháng mười một", "Tháng mười hai"], 9 | "shortMonths": ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/zh-CN.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%x %A %X", 3 | "date": "%Y年%-m月%-d日", 4 | "time": "%H:%M:%S", 5 | "periods": ["上午", "下午"], 6 | "days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], 7 | "shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], 8 | "months": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], 9 | "shortMonths": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/locales/time-format/zh-TW.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%x %A %X", 3 | "date": "%Y年%-m月%-d日", 4 | "time": "%H:%M:%S", 5 | "periods": ["上午", "下午"], 6 | "days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], 7 | "shortDays": ["日", "一", "二", "三", "四", "五", "六"], 8 | "months": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], 9 | "shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"] 10 | } 11 | -------------------------------------------------------------------------------- /vl-convert-rs/src/html.rs: -------------------------------------------------------------------------------- 1 | use crate::module_loader::import_map::{DEBOUNCE_PATH, JSDELIVR_URL, VEGA_EMBED_PATH, VEGA_PATH}; 2 | use crate::module_loader::VlConvertBundleLoader; 3 | use crate::VlVersion; 4 | use deno_core::error::AnyError; 5 | use deno_emit::{bundle, BundleOptions, BundleType, EmitOptions, SourceMapOption}; 6 | use std::path::Path; 7 | 8 | pub fn get_vega_or_vegalite_script( 9 | spec: serde_json::Value, 10 | opts: serde_json::Value, 11 | ) -> Result { 12 | let chart_id = "vega-chart"; 13 | 14 | // Setup embed opts 15 | let opts = format!("const opts = {}", serde_json::to_string(&opts)?); 16 | 17 | let index_js = format!( 18 | r##" 19 | {{ 20 | const spec = {SPEC}; 21 | {opts} 22 | vegaEmbed('#{chart_id}', spec, opts).catch(console.error); 23 | }} 24 | "##, 25 | SPEC = serde_json::to_string(&spec)? 26 | ); 27 | Ok(index_js) 28 | } 29 | 30 | pub async fn bundle_script(script: String, vl_version: VlVersion) -> Result { 31 | // Bundle dependencies 32 | let bundle_entry_point = 33 | deno_core::resolve_path("vl-convert-index.js", Path::new(env!("CARGO_MANIFEST_DIR")))?; 34 | let mut loader = VlConvertBundleLoader::new(script, vl_version); 35 | let bundled = bundle( 36 | bundle_entry_point, 37 | &mut loader, 38 | None, 39 | BundleOptions { 40 | bundle_type: BundleType::Module, 41 | transpile_options: Default::default(), 42 | emit_options: EmitOptions { 43 | source_map: SourceMapOption::None, 44 | ..Default::default() 45 | }, 46 | emit_ignore_directives: false, 47 | minify: true, 48 | }, 49 | ) 50 | .await?; 51 | Ok(bundled.code) 52 | } 53 | 54 | /// Bundle a JavaScript snippet that may contain references to vegaEmbed, vegaLite, or vega 55 | pub async fn bundle_vega_snippet(snippet: &str, vl_version: VlVersion) -> Result { 56 | let script = format!( 57 | r#" 58 | import vegaEmbed from "{JSDELIVR_URL}{VEGA_EMBED_PATH}.js" 59 | import vega from "{JSDELIVR_URL}{VEGA_PATH}.js" 60 | import vegaLite from "{JSDELIVR_URL}{VEGA_LITE_PATH}.js" 61 | import lodashDebounce from "{JSDELIVR_URL}{DEBOUNCE_PATH}.js" 62 | {snippet} 63 | "#, 64 | VEGA_LITE_PATH = vl_version.to_path() 65 | ); 66 | 67 | bundle_script(script.to_string(), vl_version).await 68 | } 69 | -------------------------------------------------------------------------------- /vl-convert-rs/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | pub mod converter; 4 | pub mod html; 5 | pub mod image_loading; 6 | pub mod module_loader; 7 | pub mod text; 8 | 9 | #[macro_use] 10 | extern crate lazy_static; 11 | 12 | pub use converter::VlConverter; 13 | pub use deno_runtime::deno_core::anyhow; 14 | pub use module_loader::import_map::VlVersion; 15 | pub use serde_json; 16 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/Caveat/Caveat-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/Caveat/Caveat-VariableFont_wght.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/Caveat/README.txt: -------------------------------------------------------------------------------- 1 | Caveat Variable Font 2 | ==================== 3 | 4 | This download contains Caveat as both a variable font and static fonts. 5 | 6 | Caveat is a variable font with this axis: 7 | wght 8 | 9 | This means all the styles are contained in a single file: 10 | Caveat-VariableFont_wght.ttf 11 | 12 | If your app fully supports variable fonts, you can now pick intermediate styles 13 | that aren’t available as static fonts. Not all apps support variable fonts, and 14 | in those cases you can use the static font files for Caveat: 15 | static/Caveat-Regular.ttf 16 | static/Caveat-Medium.ttf 17 | static/Caveat-SemiBold.ttf 18 | static/Caveat-Bold.ttf 19 | 20 | Get started 21 | ----------- 22 | 23 | 1. Install the font files you want to use 24 | 25 | 2. Use your app's font picker to view the font family and all the 26 | available styles 27 | 28 | Learn more about variable fonts 29 | ------------------------------- 30 | 31 | https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts 32 | https://variablefonts.typenetwork.com 33 | https://medium.com/variable-fonts 34 | 35 | In desktop apps 36 | 37 | https://theblog.adobe.com/can-variable-fonts-illustrator-cc 38 | https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts 39 | 40 | Online 41 | 42 | https://developers.google.com/fonts/docs/getting_started 43 | https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide 44 | https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts 45 | 46 | Installing fonts 47 | 48 | MacOS: https://support.apple.com/en-us/HT201749 49 | Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux 50 | Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows 51 | 52 | Android Apps 53 | 54 | https://developers.google.com/fonts/docs/android 55 | https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts 56 | 57 | License 58 | ------- 59 | Please read the full license text (OFL.txt) to understand the permissions, 60 | restrictions and requirements for usage, redistribution, and modification. 61 | 62 | You can use them in your products & projects – print or digital, 63 | commercial or otherwise. 64 | 65 | This isn't legal advice, please consider consulting a lawyer and see the full 66 | license for all details. 67 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/Caveat/static/Caveat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/Caveat/static/Caveat-Bold.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/Caveat/static/Caveat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/Caveat/static/Caveat-Medium.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/Caveat/static/Caveat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/Caveat/static/Caveat-Regular.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/Caveat/static/Caveat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/Caveat/static/Caveat-SemiBold.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-Bold.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-BoldItalic.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-Heavy.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-Heavy.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-HeavyItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-HeavyItalic.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-Light.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-LightItalic.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-Medium.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-MediumItalic.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-Regular.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-RegularItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-RegularItalic.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-SemiBold.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/fonts/matter/Matter-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/fonts/matter/Matter-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /vl-convert-rs/tests/locale/format/it-IT.json: -------------------------------------------------------------------------------- 1 | { 2 | "decimal": ",", 3 | "thousands": ".", 4 | "grouping": [3], 5 | "currency": ["€", ""] 6 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/locale/time-format/it-IT.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateTime": "%A %e %B %Y, %X", 3 | "date": "%d/%m/%Y", 4 | "time": "%H:%M:%S", 5 | "periods": ["AM", "PM"], 6 | "days": ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], 7 | "shortDays": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], 8 | "months": ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], 9 | "shortMonths": ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"] 10 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/test_themes.rs: -------------------------------------------------------------------------------- 1 | use vl_convert_rs::VlConverter; 2 | 3 | #[tokio::test] 4 | async fn test_get_themes_dark_background() { 5 | // Create Vega-Lite Converter and perform conversion 6 | let mut converter = VlConverter::new(); 7 | if let serde_json::Value::Object(all_themes) = converter.get_themes().await.unwrap() { 8 | if let serde_json::Value::Object(dark) = all_themes.get("dark").unwrap() { 9 | let background = dark.get("background").unwrap().as_str().unwrap(); 10 | assert_eq!(background, "#333"); 11 | } else { 12 | panic!("Expected dark theme to be an object") 13 | } 14 | } else { 15 | panic!("Expected themes to be an object") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/bar_chart_trellis_compact.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": {"view": {"continuousWidth": 400, "continuousHeight": 300}}, 3 | "data": {"name": "data-e90feaf959fd425e1afec00a92fd04a7"}, 4 | "mark": "bar", 5 | "encoding": { 6 | "color": { 7 | "field": "c", 8 | "legend": {"orient": "bottom", "titleOrient": "left"}, 9 | "title": "settings", 10 | "type": "nominal" 11 | }, 12 | "column": {"field": "b", "title": "Factor B", "type": "nominal"}, 13 | "row": { 14 | "field": "a", 15 | "header": {"labelAngle": 0}, 16 | "title": "Factor A", 17 | "type": "nominal" 18 | }, 19 | "x": { 20 | "axis": {"format": "%"}, 21 | "field": "p", 22 | "title": null, 23 | "type": "quantitative" 24 | }, 25 | "y": {"axis": null, "field": "c", "type": "nominal"} 26 | }, 27 | "height": {"step": 8}, 28 | "width": 60, 29 | "$schema": "https://vega.github.io/schema/vega-lite/v4.17.0.json", 30 | "datasets": { 31 | "data-e90feaf959fd425e1afec00a92fd04a7": [ 32 | {"a": "a1", "b": "b1", "c": "x", "p": "0.14"}, 33 | {"a": "a1", "b": "b1", "c": "y", "p": "0.60"}, 34 | {"a": "a1", "b": "b1", "c": "z", "p": "0.03"}, 35 | {"a": "a1", "b": "b2", "c": "x", "p": "0.80"}, 36 | {"a": "a1", "b": "b2", "c": "y", "p": "0.38"}, 37 | {"a": "a1", "b": "b2", "c": "z", "p": "0.55"}, 38 | {"a": "a1", "b": "b3", "c": "x", "p": "0.11"}, 39 | {"a": "a1", "b": "b3", "c": "y", "p": "0.58"}, 40 | {"a": "a1", "b": "b3", "c": "z", "p": "0.79"}, 41 | {"a": "a2", "b": "b1", "c": "x", "p": "0.83"}, 42 | {"a": "a2", "b": "b1", "c": "y", "p": "0.87"}, 43 | {"a": "a2", "b": "b1", "c": "z", "p": "0.67"}, 44 | {"a": "a2", "b": "b2", "c": "x", "p": "0.97"}, 45 | {"a": "a2", "b": "b2", "c": "y", "p": "0.84"}, 46 | {"a": "a2", "b": "b2", "c": "z", "p": "0.90"}, 47 | {"a": "a2", "b": "b3", "c": "x", "p": "0.74"}, 48 | {"a": "a2", "b": "b3", "c": "y", "p": "0.64"}, 49 | {"a": "a2", "b": "b3", "c": "z", "p": "0.19"}, 50 | {"a": "a3", "b": "b1", "c": "x", "p": "0.57"}, 51 | {"a": "a3", "b": "b1", "c": "y", "p": "0.35"}, 52 | {"a": "a3", "b": "b1", "c": "z", "p": "0.49"}, 53 | {"a": "a3", "b": "b2", "c": "x", "p": "0.91"}, 54 | {"a": "a3", "b": "b2", "c": "y", "p": "0.38"}, 55 | {"a": "a3", "b": "b2", "c": "z", "p": "0.91"}, 56 | {"a": "a3", "b": "b3", "c": "x", "p": "0.99"}, 57 | {"a": "a3", "b": "b3", "c": "y", "p": "0.80"}, 58 | {"a": "a3", "b": "b3", "c": "z", "p": "0.37"} 59 | ] 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/circle_binned.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "data": {"url": "https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json"}, 4 | "mark": "circle", 5 | "encoding": { 6 | "x": { 7 | "bin": {"maxbins": 10}, 8 | "field": "IMDB Rating" 9 | }, 10 | "y": { 11 | "bin": {"maxbins": 10}, 12 | "field": "Rotten Tomatoes Rating" 13 | }, 14 | "size": {"aggregate": "count"} 15 | } 16 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/circle_binned_base_url.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "data": {"url": "data/movies.json"}, 4 | "mark": "circle", 5 | "encoding": { 6 | "x": { 7 | "bin": {"maxbins": 10}, 8 | "field": "IMDB Rating" 9 | }, 10 | "y": { 11 | "bin": {"maxbins": 10}, 12 | "field": "Rotten Tomatoes Rating" 13 | }, 14 | "size": {"aggregate": "count"} 15 | } 16 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/custom_projection.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "width": 500, 4 | "height": 300, 5 | "projection": {"translate": [1200, 700], "type": "albersUsa", "scale": 3000}, 6 | "layer": [ 7 | { 8 | "data": {"url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/airports.csv"}, 9 | "mark": "circle", 10 | "encoding": { 11 | "longitude": {"field": "longitude", "type": "quantitative"}, 12 | "latitude": {"field": "latitude", "type": "quantitative"}, 13 | "size": {"value": 10}, 14 | "color": {"value": "steelblue"} 15 | } 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_14/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"height":200,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[0,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_14/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_15/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"height":200,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[0,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_15/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_16/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"height":200,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[0,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_16/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_17/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"height":200,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[0,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_17/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_19/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"height":200,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[4,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_19/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_20/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"height":200,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[4,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_20/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_21/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"height":200,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[4,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_21/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/bar_chart_trellis_compact-excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/bar_chart_trellis_compact-excel.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/bar_chart_trellis_compact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/bar_chart_trellis_compact.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/circle_binned-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/circle_binned-dark.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/circle_binned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/circle_binned.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"height":200,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[0,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/circle_binned_base_url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/circle_binned_base_url.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/custom_projection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/custom_projection.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/float_font_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/float_font_size.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/font_with_quotes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/font_with_quotes.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/geoScale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/geoScale.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/gh_174.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/gh_174.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/line_with_log_scale-fivethirtyeight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/line_with_log_scale-fivethirtyeight.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/line_with_log_scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/line_with_log_scale.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/long_legend_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/long_legend_label.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/long_text_lable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/long_text_lable.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/lookup_urls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/lookup_urls.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/maptile_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/maptile_background.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/maptile_background_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/maptile_background_2.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/no_text_in_font_metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/no_text_in_font_metrics.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/quakes_initial_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/quakes_initial_selection.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/remote_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/remote_images.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/stacked_bar_h-vox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/stacked_bar_h-vox.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/stacked_bar_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/stacked_bar_h.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v5.json","background":"white","padding":5,"width":200,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/stacked_bar_h2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/stacked_bar_h2.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/stocks_locale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/stocks_locale.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v5_8/table_heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vega/vl-convert/7567808c92f32d86c6af64531a4eff85a8119aac/vl-convert-rs/tests/vl-specs/expected/v5_8/table_heatmap.png -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v6_1/circle_binned.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v6.json","background":"white","padding":5,"width":300,"height":300,"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/movies.json","format":{"type":"json"},"transform":[{"type":"extent","field":"IMDB Rating","signal":"bin_maxbins_10_IMDB_Rating_extent"},{"type":"bin","field":"IMDB Rating","as":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end"],"signal":"bin_maxbins_10_IMDB_Rating_bins","extent":{"signal":"bin_maxbins_10_IMDB_Rating_extent"},"maxbins":10},{"type":"extent","field":"Rotten Tomatoes Rating","signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},{"type":"bin","field":"Rotten Tomatoes Rating","as":["bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins","extent":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_extent"},"maxbins":10},{"type":"aggregate","groupby":["bin_maxbins_10_IMDB Rating","bin_maxbins_10_IMDB Rating_end","bin_maxbins_10_Rotten Tomatoes Rating","bin_maxbins_10_Rotten Tomatoes Rating_end"],"ops":["count"],"fields":[null],"as":["__count"]},{"type":"filter","expr":"isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) && isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) && isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) && isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"])"}]}],"marks":[{"name":"marks","type":"symbol","style":["circle"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"value":"#4c78a8"},"ariaRoleDescription":{"value":"circle"},"description":{"signal":"\"IMDB Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_IMDB Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_IMDB Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_IMDB Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_IMDB Rating_end\"], \"\")) + \"; Rotten Tomatoes Rating (binned): \" + (!isValid(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) || !isFinite(+datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"]) ? \"null\" : format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"], \"\") + \" – \" + format(datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"], \"\")) + \"; Count of Records: \" + (format(datum[\"__count\"], \"\"))"},"x":{"signal":"scale(\"x\", 0.5 * datum[\"bin_maxbins_10_IMDB Rating\"] + 0.5 * datum[\"bin_maxbins_10_IMDB Rating_end\"])"},"y":{"signal":"scale(\"y\", 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating\"] + 0.5 * datum[\"bin_maxbins_10_Rotten Tomatoes Rating_end\"])"},"size":{"scale":"size","field":"__count"},"shape":{"value":"circle"}}}}],"scales":[{"name":"x","type":"linear","domain":{"signal":"[bin_maxbins_10_IMDB_Rating_bins.start, bin_maxbins_10_IMDB_Rating_bins.stop]"},"range":[0,{"signal":"width"}],"bins":{"signal":"bin_maxbins_10_IMDB_Rating_bins"},"zero":false},{"name":"y","type":"linear","domain":{"signal":"[bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start, bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop]"},"range":[{"signal":"height"},0],"bins":{"signal":"bin_maxbins_10_Rotten_Tomatoes_Rating_bins"},"zero":false},{"name":"size","type":"linear","domain":{"data":"source_0","field":"__count"},"range":[4,{"signal":"pow(0.95 * min(width / ((bin_maxbins_10_IMDB_Rating_bins.stop - bin_maxbins_10_IMDB_Rating_bins.start) / bin_maxbins_10_IMDB_Rating_bins.step), height / ((bin_maxbins_10_Rotten_Tomatoes_Rating_bins.stop - bin_maxbins_10_Rotten_Tomatoes_Rating_bins.start) / bin_maxbins_10_Rotten_Tomatoes_Rating_bins.step)), 2)"}],"zero":true}],"axes":[{"scale":"x","orient":"bottom","grid":false,"title":"IMDB Rating (binned)","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/10)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"Rotten Tomatoes Rating (binned)","labelOverlap":true,"tickCount":{"signal":"ceil(height/10)"},"zindex":0}],"legends":[{"size":"size","symbolType":"circle","title":"Count of Records","encode":{"symbols":{"update":{"fill":{"value":"#4c78a8"},"stroke":{"value":"transparent"}}}}}]} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/expected/v6_1/stacked_bar_h.vg.json: -------------------------------------------------------------------------------- 1 | {"$schema":"https://vega.github.io/schema/vega/v6.json","background":"white","padding":5,"width":300,"title":{"text":"Figure & Title < ' >","frame":"group"},"style":"cell","data":[{"name":"source_0","url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json","format":{"type":"json"},"transform":[{"type":"aggregate","groupby":["variety","site"],"ops":["sum"],"fields":["yield"],"as":["sum_yield"]},{"type":"stack","groupby":["variety"],"field":"sum_yield","sort":{"field":["site"],"order":["ascending"]},"as":["sum_yield_start","sum_yield_end"],"offset":"zero"},{"type":"filter","expr":"isValid(datum[\"sum_yield\"]) && isFinite(+datum[\"sum_yield\"])"}]}],"signals":[{"name":"y_step","value":20},{"name":"height","update":"bandspace(domain('y').length, 0.1, 0.05) * y_step"}],"marks":[{"name":"marks","type":"rect","style":["bar"],"from":{"data":"source_0"},"encode":{"update":{"fill":{"scale":"color","field":"site"},"ariaRoleDescription":{"value":"bar"},"description":{"signal":"\"Sum of yield: \" + (format(datum[\"sum_yield\"], \"\")) + \"; variety: \" + (isValid(datum[\"variety\"]) ? datum[\"variety\"] : \"\"+datum[\"variety\"]) + \"; site: \" + (isValid(datum[\"site\"]) ? datum[\"site\"] : \"\"+datum[\"site\"])"},"x":{"scale":"x","field":"sum_yield_end"},"x2":{"scale":"x","field":"sum_yield_start"},"y":{"scale":"y","field":"variety"},"height":{"signal":"max(0.25, bandwidth('y'))"}}}}],"scales":[{"name":"x","type":"linear","domain":{"data":"source_0","fields":["sum_yield_start","sum_yield_end"]},"range":[0,{"signal":"width"}],"nice":true,"zero":true},{"name":"y","type":"band","domain":{"data":"source_0","field":"variety","sort":true},"range":{"step":{"signal":"y_step"}},"paddingInner":0.1,"paddingOuter":0.05},{"name":"color","type":"ordinal","domain":{"data":"source_0","field":"site","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":"x","orient":"bottom","grid":false,"title":"Sum of yield","labelFlush":true,"labelOverlap":true,"tickCount":{"signal":"ceil(width/40)"},"zindex":0},{"scale":"y","orient":"left","grid":false,"title":"variety","zindex":0}],"legends":[{"fill":"color","symbolType":"square","title":"site"}],"config":{"axis":{"labelFont":"monospace","titleFont":"serif"},"legend":{"labelFont":"sans-serif","titleFont":"serif"},"style":{"group-title":{"font":"Caveat"}}}} -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/float_font_size.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "title": "Some title", 4 | "config": {"title": {"fontSize": 12.75}}, 5 | "data": { 6 | "values": [ 7 | {"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43}, 8 | {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53}, 9 | {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52} 10 | ] 11 | }, 12 | "mark": "bar", 13 | "encoding": { 14 | "x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}}, 15 | "y": {"field": "b", "type": "quantitative"} 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/font_with_quotes.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "layer": [ 4 | { 5 | "data": { 6 | "name": "df", 7 | "values": [{"a": 1, "b": 1}, {"a": 2, "b": 3}, {"a": 3, "b": 2}] 8 | }, 9 | "layer": [ 10 | { 11 | "transform": [], 12 | "layer": [{"mark": {"type": "line"}}], 13 | "encoding": { 14 | "x": {"field": "a", "type": "quantitative"}, 15 | "y": {"field": "b", "type": "quantitative"} 16 | } 17 | } 18 | ] 19 | } 20 | ], 21 | "config": { 22 | "style": { 23 | "guide-label": {"font": "\"Liberation Sans\", sans-serif"}, 24 | "guide-title": {"font": "\"Liberation Sans\", sans-serif"} 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/line_with_log_scale.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": {"view": {"continuousWidth": 400, "continuousHeight": 300}}, 3 | "data": { 4 | "url": "https://cdn.jsdelivr.net/npm/vega-datasets@v1.29.0/data/population.json" 5 | }, 6 | "mark": "line", 7 | "encoding": { 8 | "x": {"field": "year", "type": "ordinal"}, 9 | "y": { 10 | "aggregate": "sum", 11 | "field": "people", 12 | "scale": {"type": "log"}, 13 | "type": "quantitative" 14 | } 15 | }, 16 | "$schema": "https://vega.github.io/schema/vega-lite/v4.17.0.json" 17 | } 18 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/long_legend_label.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "data": { 4 | "values": [ 5 | {"a": "J", "b": 28, "c": "I am more than 18 characters"}, 6 | {"a": "B", "b": 55}, 7 | {"a": "C", "b": 43}, 8 | {"a": "D", "b": 91}, 9 | {"a": "E", "b": 81}, 10 | {"a": "F", "b": 53}, 11 | {"a": "G", "b": 19}, 12 | {"a": "H", "b": 87}, 13 | {"a": "I", "b": 52} 14 | ] 15 | }, 16 | "mark": "bar", 17 | "encoding": { 18 | "x": {"field": "a", "type": "nominal"}, 19 | "y": {"field": "b", "type": "quantitative"}, 20 | "color": {"field": "c"} 21 | } 22 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/long_text_lable.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "data": { 4 | "values": [ 5 | {"a": "J", "b": 28, "c": "I'm a very long axis label and eventhough my axis label is cutoff, I'm still rendered in the png"}, 6 | {"a": "B", "b": 55}, 7 | {"a": "C", "b": 43}, 8 | {"a": "D", "b": 91}, 9 | {"a": "E", "b": 81}, 10 | {"a": "F", "b": 53}, 11 | {"a": "G", "b": 19}, 12 | {"a": "H", "b": 87}, 13 | {"a": "I", "b": 52} 14 | ] 15 | }, 16 | "mark": "bar", 17 | "encoding": { 18 | "x": {"field": "a", "type": "nominal"}, 19 | "y": {"field": "c", "type": "nominal"}, 20 | "color": {"field": "c", "legend": null} 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/lookup_urls.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": {"view": {"continuousWidth": 300, "continuousHeight": 300}}, 3 | "data": { 4 | "url": "https://cdn.jsdelivr.net/npm/vega-datasets@v1.29.0/data/income.json" 5 | }, 6 | "mark": {"type": "geoshape"}, 7 | "encoding": { 8 | "color": {"field": "pct", "type": "quantitative"}, 9 | "shape": {"field": "geo", "type": "geojson"}, 10 | "tooltip": [ 11 | {"field": "name", "type": "nominal"}, 12 | {"field": "pct", "type": "quantitative"} 13 | ] 14 | }, 15 | "height": 175, 16 | "projection": {"type": "albersUsa"}, 17 | "transform": [ 18 | { 19 | "lookup": "id", 20 | "as": "geo", 21 | "from": { 22 | "data": { 23 | "url": "https://cdn.jsdelivr.net/npm/vega-datasets@v1.29.0/data/us-10m.json", 24 | "format": {"feature": "states", "type": "topojson"} 25 | }, 26 | "key": "id" 27 | } 28 | } 29 | ], 30 | "width": 300, 31 | "$schema": "https://vega.github.io/schema/vega-lite/v5.8.0.json" 32 | } 33 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/maptile_background.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.8.0.json", 3 | "config": {"view": {"continuousHeight": 300, "continuousWidth": 300}}, 4 | "datasets": {"empty": [{}]}, 5 | "height": 600, 6 | "layer": [ 7 | { 8 | "data": { 9 | "name": "tile_list", 10 | "sequence": {"as": "a", "start": 0, "stop": 4} 11 | }, 12 | "encoding": { 13 | "url": {"field": "url", "type": "nominal"}, 14 | "x": {"field": "x", "scale": null, "type": "quantitative"}, 15 | "y": {"field": "y", "scale": null, "type": "quantitative"} 16 | }, 17 | "mark": { 18 | "clip": true, 19 | "height": {"expr": "tile_size - 10"}, 20 | "type": "image", 21 | "width": {"expr": "tile_size - 10"} 22 | }, 23 | "projection": { 24 | "center": [0, 50], 25 | "rotate": [-10, 0, 0], 26 | "scale": 400, 27 | "type": "mercator" 28 | }, 29 | "transform": [ 30 | {"as": "b", "calculate": "sequence(0, 4)"}, 31 | {"flatten": ["b"]}, 32 | { 33 | "as": "url", 34 | "calculate": "'https://tile.openstreetmap.org/' + zoom_ceil + '/' + ((datum.a + dii_floor + tiles_count) % tiles_count) + '/' + (datum.b + djj_floor) + '.png'" 35 | }, 36 | {"as": "x", "calculate": "datum.a * tile_size + dx + (tile_size / 2)"}, 37 | {"as": "y", "calculate": "datum.b * tile_size + dy + (tile_size / 2)"}, 38 | { 39 | "filter": "((datum.a + dii_floor + tiles_count) % tiles_count) >= 0 && (datum.b + djj_floor) >= 0 && ((datum.a + dii_floor + tiles_count) % tiles_count) <= (tiles_count - 1) && (datum.b + djj_floor) <= (tiles_count - 1)" 40 | }, 41 | { 42 | "filter": "datum.x < (width + tile_size / 2) && datum.y < (height + tile_size / 2)" 43 | } 44 | ] 45 | }, 46 | { 47 | "data": { 48 | "format": {"feature": "countries", "type": "topojson"}, 49 | "url": "https://cdn.jsdelivr.net/npm/vega-datasets@v1.29.0/data/world-110m.json" 50 | }, 51 | "encoding": { 52 | "fill": {"field": "id", "legend": null, "type": "quantitative"} 53 | }, 54 | "mark": { 55 | "fillOpacity": 0.1, 56 | "stroke": "orange", 57 | "strokeWidth": 2, 58 | "type": "geoshape" 59 | }, 60 | "projection": { 61 | "center": [0, 50], 62 | "rotate": [-10, 0, 0], 63 | "scale": 400, 64 | "type": "mercator" 65 | } 66 | }, 67 | { 68 | "data": {"name": "empty"}, 69 | "encoding": {"x": {"value": 0}, "y": {"value": {"expr": "height"}}}, 70 | "mark": { 71 | "align": "left", 72 | "dx": 3, 73 | "dy": -8, 74 | "text": "(C) OpenStreetMap contributors", 75 | "type": "text" 76 | } 77 | } 78 | ], 79 | "params": [ 80 | { 81 | "expr": "(2 * PI * pr_scale) / pow(2, zoom_level)", 82 | "name": "base_tile_size" 83 | }, 84 | {"expr": "400", "name": "pr_scale"}, 85 | {"name": "zoom_level", "value": 1}, 86 | {"expr": "ceil(zoom_level)", "name": "zoom_ceil"}, 87 | {"expr": "pow(2, zoom_ceil)", "name": "tiles_count"}, 88 | { 89 | "expr": "base_tile_size * pow(2, zoom_level - zoom_ceil)", 90 | "name": "tile_size" 91 | }, 92 | {"expr": "invert('projection', [0, 0])", "name": "base_point"}, 93 | {"expr": "(base_point[0] + 180) / 360 * tiles_count", "name": "dii"}, 94 | {"expr": "floor(dii)", "name": "dii_floor"}, 95 | {"expr": "(dii_floor - dii) * tile_size", "name": "dx"}, 96 | { 97 | "expr": "(1 - log(tan(base_point[1] * PI / 180) + 1 / cos(base_point[1] * PI / 180)) / PI) / 2 * tiles_count", 98 | "name": "djj" 99 | }, 100 | {"expr": "floor(djj)", "name": "djj_floor"}, 101 | {"expr": "round((djj_floor - djj) * tile_size)", "name": "dy"} 102 | ], 103 | "width": 600 104 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/no_text_in_font_metrics.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.9.3.json", 3 | "description": "https://github.com/vega/vl-convert/issues/72", 4 | "data": { 5 | "values": [ 6 | { 7 | "column_name": "Prior", 8 | "previous_sum": 1.2, 9 | "log2_bayes_factor": 2.4, 10 | "value": "inal score" 11 | } 12 | ] 13 | }, 14 | "layer": [ 15 | { 16 | "mark": {"type": "bar", "width": 60}, 17 | "encoding": { 18 | "x": { 19 | "type": "nominal", 20 | "axis": { 21 | "labelExpr": "datum.value == 'Prior' || datum.value == 'Final score' ? '' : datum.value", 22 | "tickBand": "extent" 23 | }, 24 | "field": "column_name" 25 | }, 26 | "y": {"type": "quantitative", "field": "previous_sum"} 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/numeric_font_weight.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "title": "Some title", 4 | "config": {"title": {"fontWeight": 600}}, 5 | "data": { 6 | "values": [ 7 | {"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43}, 8 | {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53}, 9 | {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52} 10 | ] 11 | }, 12 | "mark": "bar", 13 | "encoding": { 14 | "x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}}, 15 | "y": {"field": "b", "type": "quantitative"} 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/remote_images.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "data": { 4 | "values": [ 5 | {"x": 0.5, "y": 0.5, "img": "https://upload.wikimedia.org/wikipedia/commons/a/a0/Firefox_logo%2C_2019.svg"}, 6 | {"x": 1.5, "y": 1.5, "img": "https://vega.github.io/vega-datasets/data/gimp.png"}, 7 | {"x": 2.5, "y": 2.5, "img": "https://vega.github.io/vega-datasets/data/7zip.png"} 8 | ] 9 | }, 10 | "mark": {"type": "image", "width": 50, "height": 50}, 11 | "encoding": { 12 | "x": {"field": "x", "type": "quantitative"}, 13 | "y": {"field": "y", "type": "quantitative"}, 14 | "url": {"field": "img", "type": "nominal"} 15 | } 16 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/seattle-weather.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "title": "Seattle Weather, 2012-2015", 4 | "data": { 5 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/next/data/seattle-weather.csv" 6 | }, 7 | "vconcat": [ 8 | { 9 | "encoding": { 10 | "color": { 11 | "condition": { 12 | "param": "brush", 13 | "title": "Weather", 14 | "field": "weather", 15 | "type": "nominal", 16 | "scale": { 17 | "domain": ["sun", "fog", "drizzle", "rain", "snow"], 18 | "range": ["#e7ba52", "#a7a7a7", "#aec7e8", "#1f77b4", "#9467bd"] 19 | } 20 | }, 21 | "value": "lightgray" 22 | }, 23 | "size": { 24 | "title": "Precipitation", 25 | "field": "precipitation", 26 | "scale": {"domain": [-1, 50]}, 27 | "type": "quantitative" 28 | }, 29 | "x": { 30 | "field": "date", 31 | "timeUnit": "monthdate", 32 | "title": "Date", 33 | "axis": {"format": "%b"} 34 | }, 35 | "y": { 36 | "title": "Maximum Daily Temperature (C)", 37 | "field": "temp_max", 38 | "scale": {"domain": [-5, 40]}, 39 | "type": "quantitative" 40 | } 41 | }, 42 | "width": 600, 43 | "height": 300, 44 | "mark": "point", 45 | "params": [{ 46 | "name": "brush", 47 | "select": {"type": "interval", "encodings": ["x"]} 48 | }], 49 | "transform": [{"filter": {"param": "click"}}] 50 | }, 51 | { 52 | "encoding": { 53 | "color": { 54 | "condition": { 55 | "param": "click", 56 | "field": "weather", 57 | "scale": { 58 | "domain": ["sun", "fog", "drizzle", "rain", "snow"], 59 | "range": ["#e7ba52", "#a7a7a7", "#aec7e8", "#1f77b4", "#9467bd"] 60 | } 61 | }, 62 | "value": "lightgray" 63 | }, 64 | "x": {"aggregate": "count"}, 65 | "y": {"title": "Weather", "field": "weather"} 66 | }, 67 | "width": 600, 68 | "mark": "bar", 69 | "params": [{ 70 | "name": "click", 71 | "select": {"type": "point", "encodings": ["color"]} 72 | }], 73 | "transform": [{"filter": {"param": "brush"}}] 74 | } 75 | ] 76 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/stacked_bar_h.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "data": {"url": "https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json"}, 4 | "mark": "bar", 5 | "encoding": { 6 | "x": {"aggregate": "sum", "field": "yield"}, 7 | "y": {"field": "variety"}, 8 | "color": {"field": "site"} 9 | }, 10 | "title": "Figure & Title < ' >", 11 | "config": { 12 | "axis": {"labelFont": "monospace", "titleFont": "serif"}, 13 | "legend": {"labelFont": "sans-serif", "titleFont": "serif"}, 14 | "title": {"font": "Caveat"} 15 | } 16 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/stacked_bar_h2.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "data": {"url": "https://raw.githubusercontent.com/vega/vega-datasets/next/data/barley.json"}, 4 | "mark": "bar", 5 | "encoding": {}, 6 | "title": "Figure & Title < ' >", 7 | "config": { 8 | "title": {"font": "Matter SemiBold"} 9 | } 10 | } -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/stocks_locale.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": {"view": {"continuousWidth": 300, "continuousHeight": 300}}, 3 | "data": { 4 | "url": "https://cdn.jsdelivr.net/npm/vega-datasets@v1.29.0/data/stocks.csv" 5 | }, 6 | "mark": {"type": "area"}, 7 | "encoding": { 8 | "color": {"field": "symbol", "type": "nominal"}, 9 | "x": {"field": "date", "type": "temporal"}, 10 | "y": {"axis": {"format": "$.0f"}, "field": "price", "type": "quantitative"} 11 | }, 12 | "transform": [{"filter": "year(datum.date) == 2009"}], 13 | "$schema": "https://vega.github.io/schema/vega-lite/v5.15.1.json" 14 | } 15 | -------------------------------------------------------------------------------- /vl-convert-rs/tests/vl-specs/table_heatmap.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v5.json", 3 | "data": {"url": "data/cars.json"}, 4 | "mark": "rect", 5 | "encoding": { 6 | "y": {"field": "Origin", "type": "nominal"}, 7 | "x": {"field": "Cylinders", "type": "ordinal"}, 8 | "color": {"aggregate": "mean", "field": "Horsepower"} 9 | }, 10 | "config": { 11 | "axis": {"grid": true, "tickBand": "extent"} 12 | } 13 | } -------------------------------------------------------------------------------- /vl-convert-rs/thirdparty_javascript.md: -------------------------------------------------------------------------------- 1 | ## array-flat-polyfill 2 | License: CC0-1.0 3 | Source: https://github.com/jonathantneal/array-flat-polyfill 4 | 5 | ## clone 6 | License: MIT 7 | Source: https://github.com/pvorb/clone 8 | 9 | ## d3 10 | License: ISC 11 | Source: https://github.com/d3/d3 12 | 13 | ## delaunator 14 | License: ISC 15 | Source: https://github.com/mapbox/delaunator 16 | 17 | ## fast-deep-equal 18 | License: MIT 19 | Source: https://github.com/epoberezkin/fast-deep-equal 20 | 21 | ## fast-json-stable-stringify 22 | License: MIT 23 | Source: https://github.com/epoberezkin/fast-json-stable-stringify 24 | 25 | ## internmap 26 | License: ISC 27 | Source: https://github.com/mbostock/internmap 28 | 29 | ## robust-predicates 30 | License: Unlicense 31 | Source: https://github.com/mourner/robust-predicates 32 | 33 | ## topojson-client 34 | License: ISC 35 | Source: https://github.com/topojson/topojson-client 36 | 37 | ## vega-lite 38 | License: BSD-3-Clause 39 | Source: https://github.com/vega/vega-lite 40 | 41 | ## vega 42 | License: BSD-3-Clause 43 | Source: https://github.com/vega/vega -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/d3-dispatch@3.0.1/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/d3-dispatch@3.0.1/src/index.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | var n={value:()=>{}};function r(){for(var n,r=0,e=arguments.length,o={};r=0&&(r=n.slice(t+1),n=n.slice(0,t)),n&&!i.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}}))),f=-1,u=a.length;if(!(arguments.length<2)){if(null!=r&&"function"!=typeof r)throw new Error("invalid callback: "+r);for(;++f0)for(var t,e,o=new Array(t),i=0;i9999?"+"+o(n,6):o(n,4))+"-"+o(r.getUTCMonth()+1,2)+"-"+o(r.getUTCDate(),2)+(u?"T"+o(t,2)+":"+o(e,2)+":"+o(a,2)+"."+o(u,3)+"Z":a?"T"+o(t,2)+":"+o(e,2)+":"+o(a,2)+"Z":e||t?"T"+o(t,2)+":"+o(e,2)+"Z":"")}function u(o){var u=new RegExp('["'+o+"\n\r]"),i=o.charCodeAt(0);function f(t,e){var o,a=[],u=t.length,f=0,c=0,s=u<=0,l=!1;function d(){if(s)return n;if(l)return l=!1,r;var e,o,a=f;if(34===t.charCodeAt(a)){for(;f++=u?s=!0:10===(o=t.charCodeAt(f++))?l=!0:13===o&&(l=!0,10===t.charCodeAt(f)&&++f),t.slice(a+1,e-1).replace(/""/g,'"')}for(;f=0))throw new Error(`invalid digits: ${t}`);if(i>15)return _;const h=10**i;return function(t){this._+=t[0];for(let i=1,s=t.length;ih)if(Math.abs(l*r-o*p)>h&&n){let x=_-$,d=e-a,y=r*r+o*o,M=x*x+d*d,c=Math.sqrt(y),f=Math.sqrt(u),w=n*Math.tan((t-Math.acos((y+u-M)/(2*c*f)))/2),v=w/f,g=w/c;Math.abs(v-1)>h&&this._append`L${i+v*p},${s+v*l}`,this._append`A${n},${n},0,0,${+(l*x>p*d)},${this._x1=i+g*r},${this._y1=s+g*o}`}else this._append`L${this._x1=i},${this._y1=s}`;else;}arc(_,e,n,$,a,r){if(_=+_,e=+e,r=!!r,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos($),p=n*Math.sin($),l=_+o,u=e+p,x=1^r,d=r?$-a:a-$;null===this._x1?this._append`M${l},${u}`:(Math.abs(this._x1-l)>h||Math.abs(this._y1-u)>h)&&this._append`L${l},${u}`,n&&(d<0&&(d=d%i+i),d>s?this._append`A${n},${n},0,1,${x},${_-o},${e-p}A${n},${n},0,1,${x},${this._x1=l},${this._y1=u}`:d>h&&this._append`A${n},${n},0,${+(d>=t)},${x},${this._x1=_+n*Math.cos(a)},${this._y1=e+n*Math.sin(a)}`)}rect(t,i,h,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${h=+h}v${+s}h${-h}Z`}toString(){return this._}}function n(){return new e}function $(t=3){return new e(+t)}n.prototype=e.prototype;export{e as Path,n as path,$ as pathRound};export default null; 8 | //# sourceMappingURL=/sm/4b0f83ad55292d369ec29006d64eff4aa1bed2abe039ef062f245c6ffb6689b3.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/d3-timer@3.0.1/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/d3-timer@3.0.1/src/index.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | var t,n,e=0,r=0,o=0,i=0,a=0,l=0,u="object"==typeof performance&&performance.now?performance:Date,c="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function s(){return a||(c(f),a=u.now()+l)}function f(){a=0}function _(){this._call=this._time=this._next=null}function w(t,n,e){var r=new _;return r.restart(t,n,e),r}function m(){s(),++e;for(var n,r=t;r;)(n=a-r._time)>=0&&r._call.call(void 0,n),r=r._next;--e}function p(){a=(i=u.now())+l,e=r=0;try{m()}finally{e=0,function(){var e,r,o=t,i=1/0;for(;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(r=o._next,o._next=null,o=e?e._next=r:t=r);n=e,v(i)}(),a=0}}function h(){var t=u.now(),n=t-i;n>1e3&&(l-=n,i=t)}function v(t){e||(r&&(r=clearTimeout(r)),t-a>24?(t<1/0&&(r=setTimeout(p,t-u.now()-l)),o&&(o=clearInterval(o))):(o||(i=u.now(),o=setInterval(h,1e3)),e=1,c(p)))}function x(t,n,e){var r=new _;return n=null==n?0:+n,r.restart((e=>{r.stop(),t(e+n)}),n,e),r}function y(t,n,e){var r=new _,o=n;return null==n?(r.restart(t,n,e),r):(r._restart=r.restart,r.restart=function(t,n,e){n=+n,e=null==e?s():+e,r._restart((function i(a){a+=o,r._restart(i,o+=n,e),t(a)}),n,e)},r.restart(t,n,e),r)}_.prototype=w.prototype={constructor:_,restart:function(e,r,o){if("function"!=typeof e)throw new TypeError("callback is not a function");o=(null==o?s():+o)+(null==r?0:+r),this._next||n===this||(n?n._next=this:t=this,n=this),this._call=e,this._time=o,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}};export{y as interval,s as now,x as timeout,w as timer,m as timerFlush};export default null; 8 | //# sourceMappingURL=/sm/f543d8e949e76521e54ffb9d4a7baeb26408401957251725b1f300f2767feded.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/fast-deep-equal@3.1.3/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/fast-deep-equal@3.1.3/index.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | var r=function r(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var o,n,f;if(Array.isArray(t)){if((o=t.length)!=e.length)return!1;for(n=o;0!=n--;)if(!r(t[n],e[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if((o=(f=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,f[n]))return!1;for(n=o;0!=n--;){var u=f[n];if(!r(t[u],e[u]))return!1}return!0}return t!=t&&e!=e};export{r as default}; 8 | //# sourceMappingURL=/sm/07f689a8c7175ef0a58d44b272dc137ebf7ea2c25e1798f00a66b4798b1bd18f.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/fast-json-stable-stringify@2.1.0/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/fast-json-stable-stringify@2.1.0/index.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | var r=function(r,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var e,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(e=t.cmp,function(r){return function(t,n){var i={key:t,value:r[t]},u={key:n,value:r[n]};return e(i,u)}}),u=[];return function r(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var e,o;if(Array.isArray(t)){for(o="[",e=0;et||`${n} `));if(t.length<=f)return t}if(null!=r&&(e=JSON.parse(c),r=void 0),"object"==typeof e&&null!==e){const n=l+o,i=[];let r,s,c=0;if(Array.isArray(e)){r="[",s="]";const{length:o}=e;for(;c0)return[r,o+i.join(`,\n${n}`),s].join(`\n${l}`)}return c}(t,"",0)}export{t as default}; 8 | //# sourceMappingURL=/sm/41daf328ec920d0650f5542c9393fa04984ee5b2c1cb22e4a4532195c469d5f5.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/lodash.debounce@4.0.8/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/lodash.debounce@4.0.8/index.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,r=parseInt,f="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,a=f||u||Function("return this")(),c=Object.prototype.toString,l=Math.max,s=Math.min,d=function(){return a.Date.now()};function p(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==c.call(t)}(t))return NaN;if(p(t)){var f="function"==typeof t.valueOf?t.valueOf():t;t=p(f)?f+"":f}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(e,"");var u=i.test(t);return u||o.test(t)?r(t.slice(2),u?2:8):n.test(t)?NaN:+t}var b=function(t,e,n){var i,o,r,f,u,a,c=0,b=!1,y=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=i,r=o;return i=o=void 0,c=e,f=t.apply(r,n)}function j(t){var n=t-a;return void 0===a||n>=e||n<0||y&&t-c>=r}function h(){var t=d();if(j(t))return T(t);u=setTimeout(h,function(t){var n=e-(t-a);return y?s(n,r-(t-c)):n}(t))}function T(t){return u=void 0,m&&i?g(t):(i=o=void 0,f)}function w(){var t=d(),n=j(t);if(i=arguments,o=this,a=t,n){if(void 0===u)return function(t){return c=t,u=setTimeout(h,e),b?g(t):f}(a);if(y)return u=setTimeout(h,e),g(a)}return void 0===u&&(u=setTimeout(h,e)),f}return e=v(e)||0,p(n)&&(b=!!n.leading,r=(y="maxWait"in n)?l(v(n.maxWait)||0,e):r,m="trailing"in n?!!n.trailing:m),w.cancel=function(){void 0!==u&&clearTimeout(u),c=0,i=a=o=u=void 0},w.flush=function(){return void 0===u?f:T(d())},w};export{b as default}; 8 | //# sourceMappingURL=/sm/d1d0371200721f147eb7701d75fa349d571b598fe3c9d87a85cdf12ecff8d7ff.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/vega-canvas@2.0.0/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/vega-canvas@2.0.0/build/vega-canvas.browser.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | function e(e,t){if("undefined"!=typeof document&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}const t=()=>"undefined"!=typeof Image?Image:null;export{e as canvas,e as domCanvas,t as image};export default null; 8 | //# sourceMappingURL=/sm/5b7548c0c2e01c2766783344251732d9fb8db7a3a83da90bbcf8d1df2f539fb3.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/vega-event-selector@4.0.0/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.37.0. 3 | * Original file: /npm/vega-event-selector@4.0.0/build/vega-event-selector.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | const t="[",e="]",r=/[[\]{}]/,n={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let i,s;function l(t,e,r){return i=e||"view",s=r||n,c(t.trim()).map(u)}function o(t,e,r,n,i){const s=t.length;let l,o=0;for(;e"!==r[0])throw"Expected '>' after between selector: "+r;i=i.map(u);const l=u(r.slice(1).trim());if(l.between)return{between:i,stream:l};l.between=i;return l}(n):function(n){const l={source:i},c=[];let u,h,f=[0,0],a=0,m=0,p=n.length,w=0;if("}"===n[p-1]){if(w=n.lastIndexOf("{"),!(w>=0))throw"Unmatched right brace: "+n;try{f=function(t){const e=t.split(",");if(!t.length||e.length>2)throw t;return e.map((e=>{const r=+e;if(r!=r)throw t;return r}))}(n.substring(w+1,p-1))}catch(t){throw"Invalid throttle specification: "+n}p=(n=n.slice(0,w).trim()).length,w=0}if(!p)throw n;"@"===n[0]&&(a=++w);u=o(n,w,":"),u1?(l.type=c[1],a?l.markname=c[0].slice(1):(g=c[0],s[g]?l.marktype=c[0]:l.source=c[0])):l.type=c[0];var g;"!"===l.type.slice(-1)&&(l.consume=!0,l.type=l.type.slice(0,-1));null!=h&&(l.filter=h);f[0]&&(l.throttle=f[0]);f[1]&&(l.debounce=f[1]);return l}(n)}export{l as parseSelector};export default null; 8 | //# sourceMappingURL=/sm/cab623ccbc603ef322a7051434d8e3b3b3ac55a77b9d29d5793e8ae14ae5923f.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/vega-force@5.0.0/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/vega-force@5.0.0/build/vega-force.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import{Transform as e}from"/npm/vega-dataflow@6.0.0/+esm";import{inherits as a,array as t,isFunction as r,accessorFields as n,hasOwnProperty as o,error as i}from"/npm/vega-util@2.0.0/+esm";import{forceSimulation as f,forceCenter as m,forceCollide as p,forceManyBody as l,forceLink as s,forceX as u,forceY as d}from"/npm/d3-force@3.0.0/+esm";const c={center:m,collide:p,nbody:l,link:s,x:u,y:d},y="forces",h=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],b=["static","iterations"],g=["x","y","vx","vy"];function x(a){e.call(this,null,a)}function k(e,a,r,n){var o,i,f,m,p=t(a.forces);for(o=0,i=h.length;oa(e,t):a)}x.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:g}]},a(x,e,{transform(e,a){var t,r,n=this.value,o=a.changed(a.ADD_REM),i=e.modified(h),m=e.iterations||300;if(n?(o&&(a.modifies("index"),n.nodes(a.source)),(i||a.changed(a.MOD))&&k(n,e,0,a)):(this.value=n=function(e,a){const t=f(e),r=t.stop,n=t.restart;let o=!1;return t.stopped=()=>o,t.restart=()=>(o=!1,n()),t.stop=()=>(o=!0,r()),k(t,a,!0).on("end",(()=>o=!0))}(a.source,e),n.on("tick",(t=a.dataflow,r=this,()=>t.touch(r).run())),e.static||(o=!0,n.tick()),a.modifies("index")),i||o||e.modified(b)||a.changed()&&e.restart)if(n.alpha(Math.max(n.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(n.alphaMin(),1/m)),e.static)for(n.stop();--m>=0;)n.tick();else if(n.stopped()&&n.restart(),!o)return a.StopPropagation;return this.finish(e,a)},finish(e,a){const t=a.dataflow;for(let e,a=this._argops,f=0,m=a.length;fr[e]||(r[e]=t(e))}function O(i){const a=B(i.format),c=i.formatPrefix;return{format:a,formatPrefix:c,formatFloat(t){const e=r(t||",");if(null==e.precision){switch(e.precision=12,e.type){case"%":e.precision-=2;break;case"e":e.precision-=1}return n=a(e),o=a(".1f")(1)[1],t=>{const r=n(t),e=r.indexOf(o);if(e<0)return r;let i=function(t,r){let e,n=t.lastIndexOf("e");if(n>0)return n;for(n=t.length;--n>r;)if(e=t.charCodeAt(n),e>=48&&e<=57)return n+1}(r,e);const a=ie;)if("0"!==r[i]){++i;break}return r.slice(0,i)+a}}return a(e);var n,o},formatSpan(i,s,f,u){u=r(null==u?",f":u);const m=t(i,s,f),p=Math.max(Math.abs(i),Math.abs(s));let l;if(null==u.precision)switch(u.type){case"s":return isNaN(l=o(m,p))||(u.precision=l),c(u,p);case"":case"e":case"g":case"p":case"r":isNaN(l=n(m,p))||(u.precision=l-("e"===u.type));break;case"f":case"%":isNaN(l=e(m))||(u.precision=l-2*("%"===u.type))}return a(u)}}}let S,z;function A(){return S=O({format:i,formatPrefix:a})}function C(t){return O(c(t))}function Y(t){return arguments.length?S=C(t):S}function $(t,r,e){y(e=e||{})||N(`Invalid time multi-format specifier: ${e}`);const n=r(s),o=r(f),i=r(u),a=r(m),c=r(p),P=r(l),b=r(h),F=r(d),v=t(e[g]||".%L"),I=t(e[s]||":%S"),M=t(e[f]||"%I:%M"),k=t(e[u]||"%I %p"),w=t(e[m]||e[x]||"%a %d"),L=t(e[p]||"%b %d"),B=t(e[l]||"%B"),O=t(e[h]||"%B"),S=t(e[d]||"%Y");return t=>(n(t)F(t)?r(t):$(r,P,t),utcFormat:t=>F(t)?e(t):$(e,b,t),timeParse:B(t.parse),utcParse:B(t.utcParse)}}function q(){return z=j({format:I,parse:M,utcFormat:k,utcParse:w})}function D(t){return j(L(t))}function E(t){return arguments.length?z=D(t):z}A(),q();const G=(t,r)=>v({},t,r);function H(t,r){const e=t?C(t):Y(),n=r?D(r):E();return G(e,n)}function J(t,r){const e=arguments.length;return e&&2!==e&&N("defaultLocale expects either zero or two arguments."),e?G(Y(t),E(r)):G(Y(),E())}function K(){return A(),q(),J()}export{J as defaultLocale,H as locale,Y as numberFormatDefaultLocale,C as numberFormatLocale,K as resetDefaultLocale,A as resetNumberFormatDefaultLocale,q as resetTimeFormatDefaultLocale,E as timeFormatDefaultLocale,D as timeFormatLocale};export default null; 8 | //# sourceMappingURL=/sm/9d7d34988b90f402f416507827dc977dfe238d8d8ab08fd61d390a2ff2c1a156.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/vega-projection@2.0.0/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/vega-projection@2.0.0/build/vega-projection.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import{geoPath as t,geoAlbers as e,geoAlbersUsa as r,geoAzimuthalEqualArea as n,geoAzimuthalEquidistant as o,geoConicConformal as a,geoConicEqualArea as i,geoConicEquidistant as c,geoEqualEarth as l,geoEquirectangular as s,geoGnomonic as p,geoIdentity as u,geoMercator as m,geoNaturalEarth1 as f,geoOrthographic as h,geoStereographic as g,geoTransverseMercator as d}from"/npm/d3-geo@3.1.1/+esm";import{geoMollweide as q}from"/npm/d3-geo-projection@4.0.0/+esm";import{registerScale as y}from"/npm/vega-scale@8.0.0/+esm";const E=t(),b=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function w(e,r){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(x[e]=function(e,r){return function n(){const o=r();return o.type=e,o.path=t().projection(o),o.copy=o.copy||function(){const t=n();return b.forEach((e=>{o[e]&&t[e](o[e]())})),t.path.pointRadius(o.path.pointRadius()),t},y(o)}}(e,r),this):x[e]||null}function j(t){return t&&t.path||E}const x={albers:e,albersusa:r,azimuthalequalarea:n,azimuthalequidistant:o,conicconformal:a,conicequalarea:i,conicequidistant:c,equalEarth:l,equirectangular:s,gnomonic:p,identity:u,mercator:m,mollweide:q,naturalEarth1:f,orthographic:h,stereographic:g,transversemercator:d};for(const t in x)w(t,x[t]);export{j as getProjectionPath,w as projection,b as projectionProperties};export default null; 8 | //# sourceMappingURL=/sm/7abe994764d8446cff79e6b4ad07b1c789f0effd819ed77c539750a3ee5651f7.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/vega-regression@2.0.0/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/vega-regression@2.0.0/build/vega-regression.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import{regressionLoess as e,sampleCurve as a,regressionConstant as r,regressionLinear as t,regressionLog as n,regressionExp as o,regressionPow as s,regressionQuad as i,regressionPoly as l}from"/npm/vega-statistics@2.0.0/+esm";import{Transform as u,ingest as d}from"/npm/vega-dataflow@6.0.0/+esm";import{inherits as m,accessorName as p,hasOwnProperty as f,error as h,extent as y}from"/npm/vega-util@2.0.0/+esm";function c(e,a){var r,t,n,o,s,i,l=[],u=function(e){return e(o)};if(null==a)l.push(e);else for(r={},t=0,n=e.length;t{e(r,a.x,a.y,a.bandwidth||.3).forEach((e=>{const a={};for(let e=0;e"poly"===e?a:"quad"===e?2:1)(s,i),u=e.as||[p(e.x),p(e.y)],m=v[s],g=[];let b=e.extent;f(v,s)||h("Invalid regression method: "+s),null!=b&&"log"===s&&b[0]<=0&&(r.dataflow.warn("Ignoring extent with values <= 0 for log regression."),b=null),n.forEach((t=>{if(t.length<=l)return void r.dataflow.warn("Skipping regression with more parameters than data points.");const n=m(t,e.x,e.y,i);if(e.params)return void g.push(d({keys:t.dims,coef:n.coef,rSquared:n.rSquared}));const p=b||y(t,e.x),f=e=>{const a={};for(let e=0;ef([e,n.predict(e)]))):a(n.predict,p,25,200).forEach(f)})),this.value&&(t.rem=this.value),this.value=t.add=t.source=g}return t}});export{g as loess,b as regression};export default null; 8 | //# sourceMappingURL=/sm/e7b61d60185423350e283c384fbd436bb28d97fe70e66adb4693047fbb346163.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/vega-schema-url-parser@3.0.2/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/vega-schema-url-parser@3.0.2/dist/parser.modern.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | function e(e){const[n,r]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:n,version:r}}export{e as default}; 8 | //# sourceMappingURL=/sm/32c755189554c9ede313440ca6f68b6a9291a31ef03a5ee7b9d05d0b8220d6bd.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/vega-selections@6.0.0/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.37.0. 3 | * Original file: /npm/vega-selections@6.0.0/build/vega-selection.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import{bisector as e,union as t,intersection as n}from"/npm/d3-array@3.2.4/+esm";import{field as r,extend as i,array as u,toNumber as f,error as l,peek as s,hasOwnProperty as a,isDate as o,isArray as c,inrange as p}from"/npm/vega-util@2.0.0/+esm";import{Literal as d}from"/npm/vega-expression@6.0.0/+esm";const v=Symbol("vega_selection_getter");function g(e){return e.getter&&e.getter[v]||(e.getter=r(e.field),e.getter[v]=!0),e.getter}const h="intersect",m="union",y="or",E="and",_="_vgsid_",R=r(_),x="index:unit";function $(e,t){for(var n,r,i=t.fields,u=t.values,l=i.length,s=0;s=u[s])return!1}else if("E-LTE"===r.type){if(n>u[s])return!1}else if("E-GT"===r.type){if(n<=u[s])return!1}else if("E-GTE"===r.type){if(ni(t.fields?{values:t.fields.map((t=>g(t)(e.datum)))}:{[_]:R(e.datum)},t)))}function z(e,t,n,r){for(var i,f,l,s,a,o,c,p,d,v,g,h,x=this.context.data[e],$=x?x.values.value:[],b={},O={},j={},L=$.length,T=0;T(e[f[n].field]=t,e)),{}))}else a=_,o=R(i),(p=(c=b[a]||(b[a]={}))[s]||(c[s]=[])).push(o),n&&(p=O[s]||(O[s]=[])).push({[_]:o});if(t=t||m,b[_]?b[_]=D[`${_}_${t}`](...Object.values(b[_])):Object.keys(b).forEach((e=>{b[e]=Object.keys(b[e]).map((t=>b[e][t])).reduce(((n,r)=>void 0===n?r:D[`${j[e]}_${t}`](n,r)))})),$=Object.keys(O),n&&$.length){b[r?"vlPoint":"vlMulti"]=t===m?{[y]:$.reduce(((e,t)=>(e.push(...O[t]),e)),[])}:{[E]:$.map((e=>({[y]:O[e]})))}}return b}var D={[`${_}_union`]:t,[`${_}_intersect`]:n,E_union:function(e,t){if(!e.length)return t;for(var n=0,r=t.length;nt.includes(e))):t},R_union:function(e,t){var n=f(t[0]),r=f(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]r&&(n=t[1],r=t[0]),e.length?rr&&(e[1]=r),e):[n,r]}};function N(e,t,n,r){t[0].type!==d&&l("First argument to selection functions must be a string literal.");const i=t[0].value,u="unit",f="@"+u,o=":"+i;(t.length>=2&&s(t).value)!==h||a(r,f)||(r[f]=n.getData(i).indataRef(n,u)),a(r,o)||(r[o]=n.getData(i).tuplesRef())}export{T as selectionIdTest,z as selectionResolve,b as selectionTest,k as selectionTuples,N as selectionVisitor};export default null; 8 | //# sourceMappingURL=/sm/bf0932219c3564aa7aca9dfe4956f890bede48c8a77c09b6ed613362c0000211.map -------------------------------------------------------------------------------- /vl-convert-rs/vendor/cdn.jsdelivr.net/npm/vega-voronoi@5.0.0/+esm.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. 3 | * Original file: /npm/vega-voronoi@5.0.0/build/vega-voronoi.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import{Transform as e}from"/npm/vega-dataflow@6.0.0/+esm";import{inherits as t}from"/npm/vega-util@2.0.0/+esm";import{Delaunay as n}from"/npm/d3-delaunay@6.0.4/+esm";function r(t){e.call(this,null,t)}r.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const o=[-1e5,-1e5,1e5,1e5];function a(e){const t=e[0][0],n=e[0][1];let r=e.length-1;for(;e[r][0]===t&&e[r][1]===n;--r);return"M"+e.slice(0,r+1).join("L")+"Z"}t(r,e,{transform(e,t){const r=e.as||"path",l=t.source;if(!l||!l.length)return t;let i=e.size;i=i?[0,0,i[0],i[1]]:(i=e.extent)?[i[0][0],i[0][1],i[1][0],i[1][1]]:o;const m=this.value=n.from(l,e.x,e.y).voronoi(i);for(let e=0,t=l.length;e