├── .gitattributes ├── .github └── workflows │ ├── javascript.yml │ ├── python.yml │ └── rust.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── automation └── bump_version.py ├── avenger-python ├── Cargo.toml ├── LICENSE ├── README.md ├── avenger │ ├── __init__.py │ └── altair_utils.py ├── pyproject.toml └── src │ └── lib.rs ├── avenger-scenegraph ├── Cargo.toml ├── README.md ├── src │ ├── error.rs │ ├── lib.rs │ ├── marks │ │ ├── arc.rs │ │ ├── area.rs │ │ ├── group.rs │ │ ├── image.rs │ │ ├── line.rs │ │ ├── mark.rs │ │ ├── mod.rs │ │ ├── path.rs │ │ ├── rect.rs │ │ ├── rule.rs │ │ ├── symbol.rs │ │ ├── text.rs │ │ ├── trail.rs │ │ └── value.rs │ └── scene_graph.rs └── tests │ └── test_scene_graph.rs ├── avenger-vega-renderer ├── .gitignore ├── Cargo.toml ├── README.md ├── js │ ├── index.js │ └── marks │ │ ├── arc.js │ │ ├── area.js │ │ ├── group.js │ │ ├── image.js │ │ ├── line.js │ │ ├── path.js │ │ ├── rect.js │ │ ├── rule.js │ │ ├── scenegraph.js │ │ ├── shape.js │ │ ├── symbol.js │ │ ├── text.js │ │ ├── trail.js │ │ └── util.js ├── package-lock.json ├── package.json ├── src │ ├── lib.rs │ ├── marks │ │ ├── arc.rs │ │ ├── area.rs │ │ ├── group.rs │ │ ├── image.rs │ │ ├── line.rs │ │ ├── mod.rs │ │ ├── path.rs │ │ ├── rect.rs │ │ ├── rule.rs │ │ ├── symbol.rs │ │ ├── text.rs │ │ ├── trail.rs │ │ └── util.rs │ ├── scene.rs │ └── text.rs ├── test │ ├── test_baselines.py │ └── test_server │ │ ├── .gitignore │ │ ├── bootstrap.js │ │ ├── index.html │ │ ├── index.js │ │ ├── package-lock.json │ │ ├── package.json │ │ └── webpack.config.js └── tsconfig.json ├── avenger-vega-test-data ├── Cargo.toml ├── README.md ├── fonts │ └── Caveat │ │ ├── Caveat-VariableFont_wght.ttf │ │ ├── OFL.txt │ │ ├── README.txt │ │ └── static │ │ ├── Caveat-Bold.ttf │ │ ├── Caveat-Medium.ttf │ │ ├── Caveat-Regular.ttf │ │ └── Caveat-SemiBold.ttf ├── images │ ├── VG_Black@512.png │ ├── VG_Color@512.png │ ├── VL_Black@512.png │ ├── VL_Color@512.png │ ├── VegaFusion-512x512.png │ ├── js_logo.png │ ├── matplotlib.png │ ├── python_logo.png │ ├── rust_logo.png │ └── scipy_logo.png ├── src │ └── main.rs ├── vega-scenegraphs │ ├── arc │ │ ├── arc_with_stroke.png │ │ ├── arc_with_stroke.sg.json │ │ ├── arcs_with_variable_outer_radius.png │ │ ├── arcs_with_variable_outer_radius.sg.json │ │ ├── arcs_with_variable_outer_radius_stroke.png │ │ ├── arcs_with_variable_outer_radius_stroke.sg.json │ │ ├── single_arc_no_inner.png │ │ ├── single_arc_no_inner.sg.json │ │ ├── single_arc_with_inner_radius.png │ │ ├── single_arc_with_inner_radius.sg.json │ │ ├── single_arc_with_inner_radius_wrap.png │ │ ├── single_arc_with_inner_radius_wrap.sg.json │ │ ├── single_arc_with_inner_radius_wrap_stroke.png │ │ └── single_arc_with_inner_radius_wrap_stroke.sg.json │ ├── area │ │ ├── 100_percent_stacked_area.png │ │ ├── 100_percent_stacked_area.sg.json │ │ ├── simple_unemployment.png │ │ ├── simple_unemployment.sg.json │ │ ├── simple_unemployment_stroke.png │ │ ├── simple_unemployment_stroke.sg.json │ │ ├── stacked_area.png │ │ ├── stacked_area.sg.json │ │ ├── streamgraph_area.png │ │ ├── streamgraph_area.sg.json │ │ ├── with_undefined.png │ │ ├── with_undefined.sg.json │ │ ├── with_undefined_horizontal.png │ │ └── with_undefined_horizontal.sg.json │ ├── clip │ │ ├── bar_rounded.png │ │ ├── bar_rounded.sg.json │ │ ├── clip_mixed_marks.png │ │ ├── clip_mixed_marks.sg.json │ │ ├── clip_rounded.png │ │ ├── clip_rounded.sg.json │ │ ├── text_clip.png │ │ ├── text_clip.sg.json │ │ ├── text_clip_rounded.png │ │ └── text_clip_rounded.sg.json │ ├── gradients │ │ ├── arc_gradient.png │ │ ├── arc_gradient.sg.json │ │ ├── area_line_with_gradient.png │ │ ├── area_line_with_gradient.sg.json │ │ ├── area_with_gradient.png │ │ ├── area_with_gradient.sg.json │ │ ├── default_gradient_bars_rounded_stroke.png │ │ ├── default_gradient_bars_rounded_stroke.sg.json │ │ ├── diagonal_gradient_bars_rounded.png │ │ ├── diagonal_gradient_bars_rounded.sg.json │ │ ├── heatmap_with_colorbar.png │ │ ├── heatmap_with_colorbar.sg.json │ │ ├── path_with_stroke_gradients.png │ │ ├── path_with_stroke_gradients.sg.json │ │ ├── radial_concentric_gradient_bars.png │ │ ├── radial_concentric_gradient_bars.sg.json │ │ ├── radial_offset_gradient_bars.png │ │ ├── radial_offset_gradient_bars.sg.json │ │ ├── residuals_colorscale.png │ │ ├── residuals_colorscale.sg.json │ │ ├── rules_with_gradients.png │ │ ├── rules_with_gradients.sg.json │ │ ├── stroke_rect_gradient.png │ │ ├── stroke_rect_gradient.sg.json │ │ ├── symbol_circles_gradient_stroke.png │ │ ├── symbol_circles_gradient_stroke.sg.json │ │ ├── symbol_cross_gradient.png │ │ ├── symbol_cross_gradient.sg.json │ │ ├── symbol_radial_gradient.png │ │ ├── symbol_radial_gradient.sg.json │ │ ├── trail_gradient.png │ │ └── trail_gradient.sg.json │ ├── image │ │ ├── large_images.png │ │ ├── large_images.sg.json │ │ ├── logos.png │ │ ├── logos.sg.json │ │ ├── logos_sized_aspect_false.png │ │ ├── logos_sized_aspect_false.sg.json │ │ ├── logos_sized_aspect_false_align_baseline.png │ │ ├── logos_sized_aspect_false_align_baseline.sg.json │ │ ├── logos_sized_aspect_true.png │ │ ├── logos_sized_aspect_true.sg.json │ │ ├── logos_sized_aspect_true_align_baseline.png │ │ ├── logos_sized_aspect_true_align_baseline.sg.json │ │ ├── many_images.png │ │ ├── many_images.sg.json │ │ ├── smooth_false.png │ │ ├── smooth_false.sg.json │ │ ├── smooth_true.png │ │ └── smooth_true.sg.json │ ├── line │ │ ├── connected_scatter.png │ │ ├── connected_scatter.sg.json │ │ ├── line_dashed_butt_undefined.png │ │ ├── line_dashed_butt_undefined.sg.json │ │ ├── line_dashed_round_undefined.png │ │ ├── line_dashed_round_undefined.sg.json │ │ ├── line_dashed_square_undefined.png │ │ ├── line_dashed_square_undefined.sg.json │ │ ├── lines_with_open_symbols.png │ │ ├── lines_with_open_symbols.sg.json │ │ ├── simple_dashed.png │ │ ├── simple_dashed.sg.json │ │ ├── simple_line_butt_cap_miter_join.png │ │ ├── simple_line_butt_cap_miter_join.sg.json │ │ ├── simple_line_round_cap.png │ │ ├── simple_line_round_cap.sg.json │ │ ├── simple_line_square_cap_bevel_join.png │ │ ├── simple_line_square_cap_bevel_join.sg.json │ │ ├── stocks-legend.png │ │ ├── stocks-legend.sg.json │ │ ├── stocks.png │ │ ├── stocks.sg.json │ │ ├── stocks_dashed.png │ │ └── stocks_dashed.sg.json │ ├── path │ │ ├── multi_path_no_stroke.png │ │ ├── multi_path_no_stroke.sg.json │ │ ├── multi_path_with_stroke.png │ │ ├── multi_path_with_stroke.sg.json │ │ ├── multi_path_with_stroke_no_fill.png │ │ ├── multi_path_with_stroke_no_fill.sg.json │ │ ├── single_path_no_stroke.png │ │ ├── single_path_no_stroke.sg.json │ │ ├── single_path_with_stroke.png │ │ ├── single_path_with_stroke.sg.json │ │ ├── single_path_with_stroke_no_fill.png │ │ └── single_path_with_stroke_no_fill.sg.json │ ├── rect │ │ ├── heatmap.png │ │ ├── heatmap.sg.json │ │ ├── stacked_bar.png │ │ ├── stacked_bar.sg.json │ │ ├── stacked_bar_rounded.png │ │ ├── stacked_bar_rounded.sg.json │ │ ├── stacked_bar_rounded_stroke.png │ │ ├── stacked_bar_rounded_stroke.sg.json │ │ ├── stacked_bar_rounded_stroke_opacity.png │ │ ├── stacked_bar_rounded_stroke_opacity.sg.json │ │ ├── stacked_bar_stroke.png │ │ └── stacked_bar_stroke.sg.json │ ├── rule │ │ ├── dashed_rules.png │ │ ├── dashed_rules.sg.json │ │ ├── wide_rule_axes.png │ │ ├── wide_rule_axes.sg.json │ │ ├── wide_transparent_caps.png │ │ └── wide_transparent_caps.sg.json │ ├── shape │ │ ├── london_tubes.png │ │ ├── london_tubes.sg.json │ │ ├── us-counties.png │ │ ├── us-counties.sg.json │ │ ├── us-map.png │ │ ├── us-map.sg.json │ │ ├── world-natural-earth-projection.png │ │ └── world-natural-earth-projection.sg.json │ ├── symbol │ │ ├── binned_scatter_arrow.png │ │ ├── binned_scatter_arrow.sg.json │ │ ├── binned_scatter_circle.png │ │ ├── binned_scatter_circle.sg.json │ │ ├── binned_scatter_circle_stroke.png │ │ ├── binned_scatter_circle_stroke.sg.json │ │ ├── binned_scatter_circle_stroke_no_fill.png │ │ ├── binned_scatter_circle_stroke_no_fill.sg.json │ │ ├── binned_scatter_cross.png │ │ ├── binned_scatter_cross.sg.json │ │ ├── binned_scatter_cross_stroke.png │ │ ├── binned_scatter_cross_stroke.sg.json │ │ ├── binned_scatter_diamonds.png │ │ ├── binned_scatter_diamonds.sg.json │ │ ├── binned_scatter_path.png │ │ ├── binned_scatter_path.sg.json │ │ ├── binned_scatter_path_star.png │ │ ├── binned_scatter_path_star.sg.json │ │ ├── binned_scatter_path_star_stroke_no_fill.png │ │ ├── binned_scatter_path_star_stroke_no_fill.sg.json │ │ ├── binned_scatter_square.png │ │ ├── binned_scatter_square.sg.json │ │ ├── binned_scatter_triangle-down.png │ │ ├── binned_scatter_triangle-down.sg.json │ │ ├── binned_scatter_triangle-left.png │ │ ├── binned_scatter_triangle-left.sg.json │ │ ├── binned_scatter_triangle-right.png │ │ ├── binned_scatter_triangle-right.sg.json │ │ ├── binned_scatter_triangle-up.png │ │ ├── binned_scatter_triangle-up.sg.json │ │ ├── binned_scatter_triangle.png │ │ ├── binned_scatter_triangle.sg.json │ │ ├── binned_scatter_wedge.png │ │ ├── binned_scatter_wedge.sg.json │ │ ├── mixed_symbols.png │ │ ├── mixed_symbols.sg.json │ │ ├── scatter_transparent_stroke.png │ │ ├── scatter_transparent_stroke.sg.json │ │ ├── scatter_transparent_stroke_star.png │ │ ├── scatter_transparent_stroke_star.sg.json │ │ ├── wedge_angle.png │ │ ├── wedge_angle.sg.json │ │ ├── wedge_stroke_angle.png │ │ ├── wedge_stroke_angle.sg.json │ │ ├── wind_vector.png │ │ ├── wind_vector.sg.json │ │ ├── zindex_circles.png │ │ └── zindex_circles.sg.json │ ├── text │ │ ├── arc_radial.png │ │ ├── arc_radial.sg.json │ │ ├── bar_axis_labels.png │ │ ├── bar_axis_labels.sg.json │ │ ├── emoji.png │ │ ├── emoji.sg.json │ │ ├── lasagna_plot.png │ │ ├── lasagna_plot.sg.json │ │ ├── letter_scatter.png │ │ ├── letter_scatter.sg.json │ │ ├── text_alignment.png │ │ ├── text_alignment.sg.json │ │ ├── text_rotation.png │ │ └── text_rotation.sg.json │ ├── trail │ │ ├── trail_stocks.png │ │ ├── trail_stocks.sg.json │ │ ├── trail_stocks_opacity.png │ │ └── trail_stocks_opacity.sg.json │ └── vl-convert │ │ ├── bar_chart_trellis_compact.png │ │ ├── bar_chart_trellis_compact.sg.json │ │ ├── circle_binned.png │ │ ├── circle_binned.sg.json │ │ ├── circle_binned_base_url.png │ │ ├── circle_binned_base_url.sg.json │ │ ├── custom_projection.png │ │ ├── custom_projection.sg.json │ │ ├── float_font_size.png │ │ ├── float_font_size.sg.json │ │ ├── font_with_quotes.png │ │ ├── font_with_quotes.sg.json │ │ ├── geoScale.png │ │ ├── geoScale.sg.json │ │ ├── line_with_log_scale.png │ │ ├── line_with_log_scale.sg.json │ │ ├── long_legend_label.png │ │ ├── long_legend_label.sg.json │ │ ├── lookup_urls.png │ │ ├── lookup_urls.sg.json │ │ ├── maptile_background.png │ │ ├── maptile_background.sg.json │ │ ├── no_text_in_font_metrics.png │ │ ├── no_text_in_font_metrics.sg.json │ │ ├── numeric_font_weight.png │ │ ├── numeric_font_weight.sg.json │ │ ├── quakes_initial_selection.png │ │ ├── quakes_initial_selection.sg.json │ │ ├── remote_images.png │ │ ├── remote_images.sg.json │ │ ├── seattle-weather.png │ │ ├── seattle-weather.sg.json │ │ ├── stacked_bar_h.png │ │ ├── stacked_bar_h.sg.json │ │ ├── stocks_locale.png │ │ ├── stocks_locale.sg.json │ │ ├── table_heatmap.png │ │ └── table_heatmap.sg.json └── vega-specs │ ├── arc │ ├── arc_with_stroke.vg.json │ ├── arcs_with_variable_outer_radius.vg.json │ ├── arcs_with_variable_outer_radius_stroke.vg.json │ ├── single_arc_no_inner.vg.json │ ├── single_arc_with_inner_radius.vg.json │ ├── single_arc_with_inner_radius_wrap.vg.json │ └── single_arc_with_inner_radius_wrap_stroke.vg.json │ ├── area │ ├── 100_percent_stacked_area.vg.json │ ├── simple_unemployment.vg.json │ ├── simple_unemployment_stroke.vg.json │ ├── stacked_area.vg.json │ ├── streamgraph_area.vg.json │ ├── with_undefined.vg.json │ └── with_undefined_horizontal.vg.json │ ├── clip │ ├── bar_rounded.vg.json │ ├── bar_rounded2.vg.json │ ├── clip_mixed_marks.vg.json │ ├── clip_rounded.vg.json │ ├── text_clip.vg.json │ └── text_clip_rounded.vg.json │ ├── gradients │ ├── arc_gradient.vg.json │ ├── area_line_with_gradient.vg.json │ ├── area_with_gradient.vg.json │ ├── default_gradient_bars_rounded_stroke.vg.json │ ├── diagonal_gradient_bars_rounded.vg.json │ ├── heatmap_with_colorbar.vg.json │ ├── path_with_stroke_gradients.vg.json │ ├── radial_concentric_gradient_bars.vg.json │ ├── radial_offset_gradient_bars.vg.json │ ├── residuals_colorscale.vg.json │ ├── rules_with_gradients.vg.json │ ├── stroke_rect_gradient.vg.json │ ├── symbol_circles_gradient_stroke.vg.json │ ├── symbol_cross_gradient.vg.json │ ├── symbol_radial_gradient.vg.json │ └── trail_gradient.vg.json │ ├── image │ ├── large_images.vg.json │ ├── logos.vg.json │ ├── logos_sized_aspect_false.vg.json │ ├── logos_sized_aspect_false_align_baseline.vg.json │ ├── logos_sized_aspect_true_align_baseline.vg.json │ ├── many_images.vg.json │ ├── smooth_false.vg.json │ └── smooth_true.vg.json │ ├── line │ ├── connected_scatter.vg.json │ ├── line_dashed_butt_undefined.vg.json │ ├── line_dashed_round_undefined.vg.json │ ├── line_dashed_square_undefined.vg.json │ ├── lines_with_open_symbols.vg.json │ ├── simple_dashed.vg.json │ ├── simple_line_butt_cap_miter_join.vg.json │ ├── simple_line_round_cap.vg.json │ ├── simple_line_square_cap_bevel_join.vg.json │ ├── stocks-legend.vg.json │ ├── stocks.vg.json │ └── stocks_dashed.vg.json │ ├── path │ ├── multi_path_no_stroke.vg.json │ ├── multi_path_with_stroke.vg.json │ ├── multi_path_with_stroke_no_fill.vg.json │ ├── single_path_no_stroke.vg.json │ ├── single_path_with_stroke.vg.json │ └── single_path_with_stroke_no_fill.vg.json │ ├── rect │ ├── heatmap.vg.json │ ├── stacked_bar.vg.json │ ├── stacked_bar_rounded.vg.json │ ├── stacked_bar_rounded_stroke.vg.json │ ├── stacked_bar_rounded_stroke_opacity.vg.json │ └── stacked_bar_stroke.vg.json │ ├── rule │ ├── dashed_rules.vg.json │ ├── wide_rule_axes.vg.json │ └── wide_transparent_caps.vg.json │ ├── shape │ ├── london_tubes.vg.json │ ├── us-counties.vg.json │ ├── us-map.vg.json │ └── world-natural-earth-projection.vg.json │ ├── symbol │ ├── binned_scatter_arrow.vg.json │ ├── binned_scatter_circle.vg.json │ ├── binned_scatter_circle_stroke.vg.json │ ├── binned_scatter_circle_stroke_no_fill.vg.json │ ├── binned_scatter_cross.vg.json │ ├── binned_scatter_cross_stroke.vg.json │ ├── binned_scatter_diamonds.vg.json │ ├── binned_scatter_path.vg.json │ ├── binned_scatter_path_star.vg.json │ ├── binned_scatter_path_star_stroke_no_fill.vg.json │ ├── binned_scatter_square.vg.json │ ├── binned_scatter_triangle-down.vg.json │ ├── binned_scatter_triangle-left.vg.json │ ├── binned_scatter_triangle-right.vg.json │ ├── binned_scatter_triangle-up.vg.json │ ├── binned_scatter_triangle.vg.json │ ├── binned_scatter_wedge.vg.json │ ├── mixed_symbols.vg.json │ ├── scatter_transparent_stroke.vg.json │ ├── scatter_transparent_stroke_star.vg.json │ ├── wedge_angle.vg.json │ ├── wedge_stroke_angle.vg.json │ ├── wind_vector.vg.json │ └── zindex_circles.vg.json │ ├── text │ ├── arc_radial.vg.json │ ├── bar_axis_labels.vg.json │ ├── emoji.vg.json │ ├── lasagna_plot.vg.json │ ├── letter_scatter.vg.json │ ├── text_alignment.vg.json │ └── text_rotation.vg.json │ ├── trail │ ├── trail_stocks.vg.json │ └── trail_stocks_opacity.vg.json │ └── vl-convert │ ├── bar_chart_trellis_compact.vg.json │ ├── circle_binned.vg.json │ ├── circle_binned_base_url.vg.json │ ├── custom_projection.vg.json │ ├── float_font_size.vg.json │ ├── font_with_quotes.vg.json │ ├── geoScale.vg.json │ ├── line_with_log_scale.vg.json │ ├── long_legend_label.vg.json │ ├── lookup_urls.vg.json │ ├── maptile_background.vg.json │ ├── no_text_in_font_metrics.vg.json │ ├── numeric_font_weight.vg.json │ ├── quakes_initial_selection.vg.json │ ├── remote_images.vg.json │ ├── seattle-weather.vg.json │ ├── stacked_bar_h.vg.json │ ├── stocks_locale.vg.json │ └── table_heatmap.vg.json ├── avenger-vega ├── Cargo.toml ├── README.md ├── src │ ├── error.rs │ ├── image │ │ ├── mod.rs │ │ ├── reqwest_fetcher.rs │ │ └── svg.rs │ ├── lib.rs │ ├── marks │ │ ├── arc.rs │ │ ├── area.rs │ │ ├── group.rs │ │ ├── image.rs │ │ ├── line.rs │ │ ├── mark.rs │ │ ├── mod.rs │ │ ├── path.rs │ │ ├── rect.rs │ │ ├── rule.rs │ │ ├── shape.rs │ │ ├── symbol.rs │ │ ├── text.rs │ │ ├── trail.rs │ │ └── values.rs │ └── scene_graph.rs └── tests │ └── test_parsing.rs ├── avenger-wgpu ├── Cargo.toml ├── README.md ├── src │ ├── canvas.rs │ ├── error.rs │ ├── html_canvas.rs │ ├── lib.rs │ ├── marks │ │ ├── cosmic.rs │ │ ├── gradient.rs │ │ ├── image.rs │ │ ├── instanced_mark.rs │ │ ├── mod.rs │ │ ├── multi.rs │ │ ├── multi.wgsl │ │ ├── symbol.rs │ │ ├── symbol.wgsl │ │ └── text.rs │ └── util.rs └── tests │ └── test_image_baselines.rs ├── doc └── images │ ├── cars_scatter.png │ └── isotype_emoji.png ├── examples ├── scatter-panning │ ├── Cargo.lock │ ├── Cargo.toml │ ├── index.html │ └── src │ │ ├── lib.rs │ │ ├── main.rs │ │ └── util.rs ├── vega-renderer │ ├── .gitignore │ ├── bootstrap.js │ ├── data │ │ ├── cars.json │ │ ├── cars_100k.json │ │ ├── cars_120k.json │ │ └── cars_40k.json │ ├── index.html │ ├── index.js │ ├── package-lock.json │ ├── package.json │ └── webpack.config.js └── wgpu-winit │ ├── Cargo.lock │ ├── Cargo.toml │ ├── index.html │ └── src │ ├── lib.rs │ ├── main.rs │ └── util.rs ├── pixi.lock └── pixi.toml /.gitattributes: -------------------------------------------------------------------------------- 1 | # GitHub syntax highlighting 2 | pixi.lock linguist-language=YAML 3 | 4 | -------------------------------------------------------------------------------- /.github/workflows/javascript.yml: -------------------------------------------------------------------------------- 1 | name: JavaScript 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build-vega-renderer: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | - uses: prefix-dev/setup-pixi@v0.6.0 18 | with: 19 | pixi-version: v0.20.1 20 | cache: true 21 | - name: Cache 22 | uses: actions/cache@v3 23 | with: 24 | key: ${{ runner.os }}-${{ hashFiles('pixi.lock', 'Cargo.lock') }}-build-vega-renderer 25 | path: | 26 | ~/.cargo 27 | target 28 | .pixi 29 | - name: Install wasm-pack 30 | run: | 31 | curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh 32 | - name: Build package 33 | run: | 34 | pixi run pack-vega-renderer 35 | - name: Upload artifacts 36 | uses: actions/upload-artifact@v3 37 | with: 38 | name: avenger-vega-renderer 39 | path: avenger-vega-renderer/packed/avenger-vega-renderer-*.tgz 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /.idea 3 | /avenger-wgpu/tests/output/ 4 | .DS_Store 5 | examples/wgpu-winit/pkg/ 6 | examples/wgpu-winit/target/ 7 | examples/scatter-panning/pkg/ 8 | examples/scatter-panning/target/ 9 | scratch/ 10 | 11 | # pixi environments 12 | .pixi 13 | 14 | /avenger-python/avenger/_avenger.abi3.so 15 | __pycache__/ 16 | /avenger-wasm/dist/ 17 | /examples/deno_png/chart.png 18 | /avenger-vega-renderer/test/failures/ 19 | /avenger-vega-renderer/lib/ 20 | /avenger-vega-renderer/packed/* 21 | /avenger-vega-renderer/dist-deno/ 22 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "avenger-scenegraph", 4 | "avenger-vega", 5 | "avenger-wgpu", 6 | "avenger-vega-test-data", 7 | "avenger-python", 8 | "avenger-vega-renderer", 9 | ] 10 | 11 | resolver = "2" 12 | 13 | [workspace.dependencies] 14 | serde = { version = "^1.0", features = ["derive"] } 15 | serde_json = "^1.0" 16 | thiserror = "2.0.3" 17 | lyon_path = "1.0.1" 18 | lyon_extra = "1.0.1" 19 | lyon = "1.0.1" 20 | image = { version = "0.25.5", default-features = false, features = ["png"] } 21 | lazy_static = "1.4.0" 22 | pyo3 = "0.23.2" 23 | pythonize = "0.23.0" 24 | tracing = "0.1.40" 25 | tracing-subscriber = "0.3.18" 26 | rayon = "1.8.1" 27 | winit = "0.30.5" 28 | wgpu = "23.0.1" 29 | 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2024 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. -------------------------------------------------------------------------------- /avenger-python/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "avenger-python" 3 | version = "0.0.8" 4 | edition = "2021" 5 | license = "BSD-3-Clause" 6 | description = "Python API to Avenger visualization framework" 7 | publish = false 8 | 9 | [lib] 10 | name = "avenger" 11 | crate-type = [ "cdylib",] 12 | 13 | [dependencies] 14 | pythonize = { workspace = true } 15 | pollster = "0.3" 16 | 17 | [dependencies.avenger-scenegraph] 18 | path = "../avenger-scenegraph" 19 | features = [ "pyo3",] 20 | version = "0.0.8" 21 | 22 | [dependencies.avenger-vega] 23 | path = "../avenger-vega" 24 | features = [ "pyo3",] 25 | version = "0.0.8" 26 | 27 | [dependencies.avenger-wgpu] 28 | path = "../avenger-wgpu" 29 | features = [ "pyo3",] 30 | version = "0.0.8" 31 | 32 | [dependencies.pyo3] 33 | workspace = true 34 | features = [ "extension-module", "abi3-py38",] 35 | 36 | [dependencies.serde] 37 | workspace = true 38 | 39 | [dependencies.image] 40 | workspace = true 41 | 42 | [dependencies.tracing] 43 | workspace = true 44 | 45 | [dependencies.tracing-subscriber] 46 | workspace = true 47 | features = [ "env-filter",] 48 | 49 | [dependencies.lazy_static] 50 | workspace = true 51 | -------------------------------------------------------------------------------- /avenger-python/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2024 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. -------------------------------------------------------------------------------- /avenger-python/README.md: -------------------------------------------------------------------------------- 1 | # Avenger: A visualization engine and renderer 2 | Avenger is an early stage prototype of a new foundational rendering library for information visualization (InfoVis) systems. Avenger defines a 2D scenegraph representation tailored to the needs of InfoVis systems. To start with, the initial application of Avenger is to serve as an alternative, GPU accelerated, rendering backend for Vega visualizations. 3 | 4 | # Try it out in Python with Vega-Altair 5 | The `avenger` Python package provides a [custom Altair renderer](https://altair-viz.github.io/user_guide/custom_renderers.html) named `avenger-png`. This renderer relies on vl-convert to extract the vega scenegraph corresponding to a chart and then uses Avenger to render the chart to a static PNG image. 6 | 7 | First, install altair, vega-datasets, avenger, and vl-convert-python 8 | ``` 9 | pip install -U altair vega_datasets avenger "vl-convert-python>=1.2.3" 10 | ``` 11 | 12 | Then import Altair and activate the `avenger-png` renderer 13 | 14 | ```python 15 | import altair as alt 16 | alt.renderers.enable('avenger-png', scale=1) 17 | ``` 18 | 19 | Then create and display an Altair chart as usual: 20 | 21 | ```python 22 | import altair as alt 23 | from vega_datasets import data 24 | 25 | source = data.cars() 26 | 27 | chart = alt.Chart(source).mark_circle(size=60).encode( 28 | x='Horsepower', 29 | y='Miles_per_Gallon', 30 | color='Origin', 31 | ) 32 | chart 33 | ``` 34 | ![cars_scatter](https://github.com/jonmmease/avenger/assets/15064365/d661e142-c7c5-4816-a375-49a73985bb6d) 35 | 36 | Or, convert the chart to a PNG rendered by Avenger: 37 | 38 | ```python 39 | import avenger 40 | png = avenger.altair_utils.chart_to_png(chart, scale=1) 41 | with open("scatter.png", "wb") as f: 42 | f.write(png) 43 | ``` 44 | ## Comparison to vl-convert 45 | There aren't currently many advantages to using Avenger to render Altar charts to PNG as compared with vl-convert, which performs rendering using [resvg](https://github.com/RazrFalcon/resvg). Performance is generally comparable, though Avenger can be a bit faster for charts with a large number of symbol instances. 46 | 47 | One advantage is that Avenger's text rendering support is based on [COSMIC Text](https://github.com/pop-os/cosmic-text), which supports emoji (unlike resvg's text handling). For example, here is the result of rendering the emoji example from https://altair-viz.github.io/gallery/isotype_emoji.html using Avenger: 48 | 49 | ![isotype_emoji](https://github.com/jonmmease/avenger/assets/15064365/91a1db89-9bdd-46f3-b540-c7d7bcaac3c2) 50 | -------------------------------------------------------------------------------- /avenger-python/avenger/__init__.py: -------------------------------------------------------------------------------- 1 | from ._avenger import * 2 | from . import altair_utils 3 | 4 | # Re-export public members of the Rust _avenger modules 5 | if hasattr(_avenger, "__all__"): 6 | __all__ = _avenger.__all__ 7 | -------------------------------------------------------------------------------- /avenger-python/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "avenger" 3 | version = "0.0.8" 4 | readme = "README.md" 5 | description = "A Visualization Engine and Renderer" 6 | 7 | [build-system] 8 | requires = [ "maturin>=1.1.0,<2",] 9 | build-backend = "maturin" 10 | 11 | [project.license] 12 | file = "LICENSE" 13 | 14 | [tool.maturin] 15 | module-name = "avenger._avenger" 16 | 17 | [project.entry-points."altair.vegalite.v5.renderer"] 18 | avenger-png = "avenger.altair_utils:avenger_png_renderer" 19 | avenger-html = "avenger.altair_utils:avenger_html_renderer" 20 | -------------------------------------------------------------------------------- /avenger-scenegraph/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "avenger-scenegraph" 3 | version = "0.0.8" 4 | edition = "2021" 5 | description = "A visualization engine and renderer" 6 | license = "BSD-3-Clause" 7 | 8 | [dependencies.thiserror] 9 | workspace = true 10 | 11 | [dependencies.serde] 12 | workspace = true 13 | 14 | [dependencies.lyon_extra] 15 | workspace = true 16 | 17 | [dependencies.lyon_path] 18 | workspace = true 19 | features = [ "serialization",] 20 | 21 | [dependencies.image] 22 | workspace = true 23 | features = [ "png",] 24 | 25 | [dependencies.pyo3] 26 | workspace = true 27 | optional = true 28 | -------------------------------------------------------------------------------- /avenger-scenegraph/README.md: -------------------------------------------------------------------------------- 1 | ## avenger 2 | 3 | This crates holds a serializable scene graph representation that is independent of Vega and independent 4 | of rendering 5 | -------------------------------------------------------------------------------- /avenger-scenegraph/src/error.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | #[cfg(feature = "pyo3")] 4 | use pyo3::{exceptions::PyValueError, PyErr}; 5 | 6 | #[derive(Error, Debug)] 7 | pub enum AvengerError { 8 | #[error("Internal error: `{0}`")] 9 | InternalError(String), 10 | 11 | // ParseError doesn't implement std::Error, so #[from] doesn't seem to work 12 | #[error("Error parsing SVG path")] 13 | InvalidSvgPath(lyon_extra::parser::ParseError), 14 | } 15 | 16 | // Conversion to PyO3 error 17 | #[cfg(feature = "pyo3")] 18 | impl From for PyErr { 19 | fn from(err: AvengerError) -> PyErr { 20 | PyValueError::new_err(err.to_string()) 21 | } 22 | } 23 | 24 | impl From for AvengerError { 25 | fn from(value: lyon_extra::parser::ParseError) -> Self { 26 | Self::InvalidSvgPath(value) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /avenger-scenegraph/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod error; 2 | pub mod marks; 3 | pub mod scene_graph; 4 | -------------------------------------------------------------------------------- /avenger-scenegraph/src/marks/line.rs: -------------------------------------------------------------------------------- 1 | use crate::marks::value::{ColorOrGradient, EncodingValue, Gradient, StrokeCap, StrokeJoin}; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, Clone, Serialize, Deserialize)] 5 | #[serde(rename_all = "kebab-case")] 6 | pub struct SceneLineMark { 7 | pub name: String, 8 | pub clip: bool, 9 | pub len: u32, 10 | pub gradients: Vec, 11 | pub x: EncodingValue, 12 | pub y: EncodingValue, 13 | pub defined: EncodingValue, 14 | pub stroke: ColorOrGradient, 15 | pub stroke_width: f32, 16 | pub stroke_cap: StrokeCap, 17 | pub stroke_join: StrokeJoin, 18 | pub stroke_dash: Option>, 19 | pub zindex: Option, 20 | } 21 | 22 | impl SceneLineMark { 23 | pub fn x_iter(&self) -> Box + '_> { 24 | self.x.as_iter(self.len as usize, None) 25 | } 26 | 27 | pub fn y_iter(&self) -> Box + '_> { 28 | self.y.as_iter(self.len as usize, None) 29 | } 30 | 31 | pub fn defined_iter(&self) -> Box + '_> { 32 | self.defined.as_iter(self.len as usize, None) 33 | } 34 | } 35 | 36 | impl Default for SceneLineMark { 37 | fn default() -> Self { 38 | Self { 39 | name: "line_mark".to_string(), 40 | clip: true, 41 | len: 1, 42 | gradients: vec![], 43 | x: EncodingValue::Scalar { value: 0.0 }, 44 | y: EncodingValue::Scalar { value: 0.0 }, 45 | defined: EncodingValue::Scalar { value: true }, 46 | stroke: ColorOrGradient::Color([0.0, 0.0, 0.0, 1.0]), 47 | stroke_width: 1.0, 48 | stroke_cap: Default::default(), 49 | stroke_join: Default::default(), 50 | stroke_dash: None, 51 | zindex: None, 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /avenger-scenegraph/src/marks/mark.rs: -------------------------------------------------------------------------------- 1 | use crate::marks::arc::SceneArcMark; 2 | use crate::marks::area::SceneAreaMark; 3 | use crate::marks::group::SceneGroup; 4 | use crate::marks::image::SceneImageMark; 5 | use crate::marks::line::SceneLineMark; 6 | use crate::marks::path::ScenePathMark; 7 | use crate::marks::rect::SceneRectMark; 8 | use crate::marks::rule::SceneRuleMark; 9 | use crate::marks::symbol::SceneSymbolMark; 10 | use crate::marks::text::SceneTextMark; 11 | use crate::marks::trail::SceneTrailMark; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Debug, Clone, Serialize, Deserialize)] 15 | pub enum SceneMark { 16 | Arc(SceneArcMark), 17 | Area(SceneAreaMark), 18 | Path(ScenePathMark), 19 | Symbol(SceneSymbolMark), 20 | Line(SceneLineMark), 21 | Trail(SceneTrailMark), 22 | Rect(SceneRectMark), 23 | Rule(SceneRuleMark), 24 | Text(Box), 25 | Image(Box), 26 | Group(SceneGroup), 27 | } 28 | 29 | impl SceneMark { 30 | pub fn zindex(&self) -> Option { 31 | match self { 32 | Self::Arc(mark) => mark.zindex, 33 | Self::Area(mark) => mark.zindex, 34 | Self::Path(mark) => mark.zindex, 35 | Self::Symbol(mark) => mark.zindex, 36 | Self::Line(mark) => mark.zindex, 37 | Self::Trail(mark) => mark.zindex, 38 | Self::Rect(mark) => mark.zindex, 39 | Self::Rule(mark) => mark.zindex, 40 | Self::Text(mark) => mark.zindex, 41 | Self::Image(mark) => mark.zindex, 42 | Self::Group(mark) => mark.zindex, 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /avenger-scenegraph/src/marks/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod arc; 2 | pub mod area; 3 | pub mod group; 4 | pub mod image; 5 | pub mod line; 6 | pub mod mark; 7 | pub mod path; 8 | pub mod rect; 9 | pub mod rule; 10 | pub mod symbol; 11 | pub mod text; 12 | pub mod trail; 13 | pub mod value; 14 | -------------------------------------------------------------------------------- /avenger-scenegraph/src/marks/trail.rs: -------------------------------------------------------------------------------- 1 | use crate::marks::value::{ColorOrGradient, EncodingValue, Gradient}; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, Clone, Serialize, Deserialize)] 5 | #[serde(rename_all = "kebab-case")] 6 | pub struct SceneTrailMark { 7 | pub name: String, 8 | pub clip: bool, 9 | pub len: u32, 10 | pub gradients: Vec, 11 | pub stroke: ColorOrGradient, 12 | pub x: EncodingValue, 13 | pub y: EncodingValue, 14 | pub size: EncodingValue, 15 | pub defined: EncodingValue, 16 | pub zindex: Option, 17 | } 18 | 19 | impl SceneTrailMark { 20 | pub fn x_iter(&self) -> Box + '_> { 21 | self.x.as_iter(self.len as usize, None) 22 | } 23 | 24 | pub fn y_iter(&self) -> Box + '_> { 25 | self.y.as_iter(self.len as usize, None) 26 | } 27 | 28 | pub fn size_iter(&self) -> Box + '_> { 29 | self.size.as_iter(self.len as usize, None) 30 | } 31 | 32 | pub fn defined_iter(&self) -> Box + '_> { 33 | self.defined.as_iter(self.len as usize, None) 34 | } 35 | } 36 | 37 | impl Default for SceneTrailMark { 38 | fn default() -> Self { 39 | Self { 40 | name: "trail_mark".to_string(), 41 | clip: true, 42 | len: 1, 43 | x: EncodingValue::Scalar { value: 0.0 }, 44 | y: EncodingValue::Scalar { value: 0.0 }, 45 | size: EncodingValue::Scalar { value: 1.0 }, 46 | defined: EncodingValue::Scalar { value: true }, 47 | stroke: ColorOrGradient::Color([0.0, 0.0, 0.0, 1.0]), 48 | gradients: vec![], 49 | zindex: None, 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /avenger-scenegraph/src/scene_graph.rs: -------------------------------------------------------------------------------- 1 | use crate::marks::group::SceneGroup; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, Clone, Serialize, Deserialize)] 5 | pub struct SceneGraph { 6 | pub groups: Vec, 7 | pub width: f32, 8 | pub height: f32, 9 | pub origin: [f32; 2], 10 | } 11 | -------------------------------------------------------------------------------- /avenger-scenegraph/tests/test_scene_graph.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | mod tests { 3 | #[test] 4 | fn try_it() { 5 | println!("asdf"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /avenger-vega-renderer/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | /dist_deno/ 4 | -------------------------------------------------------------------------------- /avenger-vega-renderer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "avenger-vega-renderer" 3 | version = "0.0.8" 4 | edition = "2021" 5 | 6 | [lib] 7 | crate-type = [ "cdylib", "rlib",] 8 | 9 | [features] 10 | deno = [ "avenger-wgpu/deno", "wgpu/webgpu",] 11 | default = [ "wgpu/webgl",] 12 | 13 | [dependencies] 14 | lazy_static = "1.4.0" 15 | serde_json = "1.0.114" 16 | csscolorparser = "0.7.0" 17 | lyon_path = "*" 18 | itertools = "0.13.0" 19 | wasm-bindgen-futures = "0.4.42" 20 | serde-wasm-bindgen = "0.6.5" 21 | js-sys = "0.3.69" 22 | unicode-segmentation = "*" 23 | 24 | [dependencies.console_error_panic_hook] 25 | version = "0.1.1" 26 | 27 | [dependencies.avenger-vega] 28 | path = "../avenger-vega" 29 | version = "0.0.8" 30 | 31 | [dependencies.avenger-scenegraph] 32 | path = "../avenger-scenegraph" 33 | version = "0.0.8" 34 | 35 | [dependencies.avenger-wgpu] 36 | path = "../avenger-wgpu" 37 | default-features = false 38 | version = "0.0.8" 39 | 40 | [dependencies.wgpu] 41 | workspace = true 42 | default-features = false 43 | features = [ "wgsl",] 44 | 45 | [dependencies.wasm-bindgen] 46 | version = "0.2.95" 47 | 48 | [dependencies.gloo-utils] 49 | version = "0.2.0" 50 | features = [ "serde",] 51 | 52 | [dependencies.web-sys] 53 | version = "0.3.69" 54 | features = [ "Document", "Window", "Element", "Performance", "OffscreenCanvas", "OffscreenCanvasRenderingContext2d", "TextMetrics", "ImageData",] 55 | 56 | [dependencies.image] 57 | workspace = true 58 | default-features = false 59 | features = [ "png",] 60 | -------------------------------------------------------------------------------- /avenger-vega-renderer/README.md: -------------------------------------------------------------------------------- 1 | # Avenger Vega Renderer 2 | This crate provides WASM bindings to the pure Rust Avenger crates and a Vega renderer plugin 3 | 4 | ## Build 5 | 6 | Build the package with: 7 | 8 | ``` 9 | pixi run build-vega-renderer 10 | ``` 11 | 12 | This will compile to WASM and copy the WASM and JavaScript files to the `dist/` directory. 13 | 14 | ## Test 15 | Run the playwright tests with: 16 | 17 | ``` 18 | pixi run test-vega-renderer 19 | ``` 20 | 21 | These tests compare the result of rendering a variety of charts with Vega's default svg renderer and with Avenger. The test app is located in the `test_server/` directory. 22 | 23 | ## Typecheck 24 | The JavaScript files in the `js/marks` directory use TypeScript compatible JSDoc types, and are type checked with: 25 | 26 | ``` 27 | npm run type-check 28 | ``` 29 | 30 | ## Try it out 31 | 32 | The `examples/vega-renderer` directory contains a simple app (created with [`create-wasm-app`](https://github.com/rustwasm/create-wasm-app) and then manually updated to WebPack 5) that uses the Vega renderer. 33 | 34 | From within the `examples/vega-renderer` directory: 35 | 36 | ``` 37 | npm install 38 | npm run start 39 | ``` 40 | -------------------------------------------------------------------------------- /avenger-vega-renderer/js/marks/line.js: -------------------------------------------------------------------------------- 1 | import {LineMark} from "../../lib/avenger_vega_renderer.js"; 2 | 3 | 4 | /** 5 | * @typedef {Object} LineItem 6 | * @property {number} strokeWidth 7 | * @property {string|object} stroke 8 | * @property {"butt"|"round"|"square"} strokeCap 9 | * @property {"bevel"|"miter"|"round"} strokeJoin 10 | * @property {string|number[]} strokeDash 11 | * @property {number} x 12 | * @property {number} y 13 | * @property {number} defined 14 | * @property {number} opacity 15 | * @property {number} strokeOpacity 16 | */ 17 | 18 | /** 19 | * @typedef {Object} LineMarkSpec 20 | * @property {"line"} marktype 21 | * @property {boolean} clip 22 | * @property {boolean} interactive 23 | * @property {LineItem[]} items 24 | * @property {string} name 25 | * @property {string} role 26 | * @property {number} zindex 27 | */ 28 | 29 | /** 30 | * @param {LineMarkSpec} vegaLineMark 31 | * @param {boolean} force_clip 32 | * @returns {LineMark} 33 | */ 34 | export function importLine(vegaLineMark, force_clip) { 35 | const items = vegaLineMark.items; 36 | const len = items.length; 37 | 38 | const lineMark = new LineMark( 39 | len, vegaLineMark.clip || force_clip, vegaLineMark.name, vegaLineMark.zindex 40 | ); 41 | 42 | // Handle empty mark 43 | if (len === 0) { 44 | return lineMark; 45 | } 46 | 47 | // Set scalar values based on first element 48 | const firstItem = items[0]; 49 | lineMark.set_stroke_width(firstItem.strokeWidth ?? 1); 50 | lineMark.set_stroke_join(firstItem.strokeJoin ?? "miter"); 51 | lineMark.set_stroke_cap(firstItem.strokeCap ?? "butt"); 52 | if (firstItem.strokeDash != null) { 53 | lineMark.set_stroke_dash(firstItem.strokeDash); 54 | } 55 | const strokeOpacity = (firstItem.strokeOpacity ?? 1) * (firstItem.opacity ?? 1); 56 | lineMark.set_stroke(firstItem.stroke, strokeOpacity); 57 | 58 | // Semi-required values get initialized 59 | const x = new Float32Array(len).fill(0); 60 | const y = new Float32Array(len).fill(0); 61 | const defined = new Uint8Array(len).fill(1); 62 | let anyDefined = false; 63 | 64 | items.forEach((item, i) => { 65 | x[i] = item.x ?? 0; 66 | y[i] = item.y ?? 0; 67 | 68 | if (item.defined != null) { 69 | defined[i] = item.defined; 70 | anyDefined ||= true; 71 | } 72 | }) 73 | 74 | lineMark.set_xy(x, y); 75 | if (anyDefined) { 76 | lineMark.set_defined(defined); 77 | } 78 | return lineMark; 79 | } 80 | -------------------------------------------------------------------------------- /avenger-vega-renderer/js/marks/scenegraph.js: -------------------------------------------------------------------------------- 1 | import { SceneGraph } from "../../lib/avenger_vega_renderer.js"; 2 | import { importGroup } from "./group.js"; 3 | 4 | /** 5 | * @typedef {Object} IResourceLoader 6 | * @property {function(): number} pending - Returns the number of pending load operations. 7 | * @property {function(string): Promise} sanitizeURL - Sanitizes a given URI and returns a promise that resolves to sanitized URI options. 8 | * @property {function(string): Promise} loadImage - Attempts to load an image from a given URI, handling load counters, and returns a promise. 9 | * @property {function(): Promise} ready - Returns a promise that resolves when all pending operations have completed. 10 | */ 11 | 12 | /** 13 | * @param {import("group").GroupMarkSpec} groupMark 14 | * @param {number} width 15 | * @param {number} height 16 | * @param {[number, number]} origin 17 | * @param {IResourceLoader} loader 18 | * @returns {Promise} 19 | */ 20 | export async function importScenegraph(groupMark, width, height, origin, loader) { 21 | const sceneGraph = new SceneGraph(width, height, origin[0], origin[1]); 22 | for (const vegaGroup of groupMark.items) { 23 | sceneGraph.add_group(await importGroup(vegaGroup, groupMark.name, false, loader)); 24 | } 25 | return sceneGraph; 26 | } 27 | -------------------------------------------------------------------------------- /avenger-vega-renderer/js/marks/trail.js: -------------------------------------------------------------------------------- 1 | import {TrailMark} from "../../lib/avenger_vega_renderer.js"; 2 | 3 | 4 | /** 5 | * @typedef {Object} TrailItem 6 | * @property {number} x 7 | * @property {number} y 8 | * @property {number} size 9 | * @property {number} defined 10 | * @property {string|object} fill 11 | * @property {number} opacity 12 | * @property {number} fillOpacity 13 | */ 14 | 15 | /** 16 | * @typedef {Object} TrailMarkSpec 17 | * @property {"trail"} marktype 18 | * @property {boolean} clip 19 | * @property {boolean} interactive 20 | * @property {TrailItem[]} items 21 | * @property {string} name 22 | * @property {string} role 23 | * @property {number} zindex 24 | */ 25 | 26 | /** 27 | * @param {TrailMarkSpec} vegaLineMark 28 | * @param {boolean} force_clip 29 | * @returns {TrailMark} 30 | */ 31 | export function importTrail(vegaLineMark, force_clip) { 32 | const items = vegaLineMark.items; 33 | const len = items.length; 34 | 35 | const trailMark = new TrailMark( 36 | len, vegaLineMark.clip || force_clip, vegaLineMark.name, vegaLineMark.zindex 37 | ); 38 | 39 | // Handle empty mark 40 | if (len === 0) { 41 | return trailMark; 42 | } 43 | 44 | // Set scalar values based on first element 45 | const firstItem = items[0]; 46 | const fillOpacity = (firstItem.fillOpacity ?? 1) * (firstItem.opacity ?? 1); 47 | 48 | // Note: Vega calls the color fill, avenger calls it stroke 49 | trailMark.set_stroke(firstItem.fill, fillOpacity); 50 | 51 | // Semi-required values get initialized 52 | const x = new Float32Array(len).fill(0); 53 | const y = new Float32Array(len).fill(0); 54 | const size = new Float32Array(len).fill(1); 55 | let anySize = false; 56 | 57 | const defined = new Uint8Array(len).fill(1); 58 | let anyDefined = false; 59 | 60 | items.forEach((item, i) => { 61 | x[i] = item.x ?? 0; 62 | y[i] = item.y ?? 0; 63 | 64 | if (item.size != null) { 65 | size[i] = item.size; 66 | anySize ||= true; 67 | } 68 | 69 | if (item.defined != null) { 70 | defined[i] = item.defined; 71 | anyDefined ||= true; 72 | } 73 | }) 74 | 75 | trailMark.set_xy(x, y); 76 | if (anySize) { 77 | trailMark.set_size(size); 78 | } 79 | if (anyDefined) { 80 | trailMark.set_defined(defined); 81 | } 82 | return trailMark; 83 | } 84 | -------------------------------------------------------------------------------- /avenger-vega-renderer/js/marks/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Encode an array of strings as an array of unique strings and a Uint32Array 3 | * of indices into the array of unique strings. 4 | * 5 | * @param {(string|number)[]} originalArray 6 | * @returns {{indices: Uint32Array, values: string[]}} 7 | */ 8 | export function encodeSimpleArray(originalArray) { 9 | const uniqueValuesMap = new Map(); 10 | let index = 0; 11 | 12 | // Populate the map with unique strings and their indices 13 | for (const str of originalArray) { 14 | if (!uniqueValuesMap.has(str)) { 15 | uniqueValuesMap.set(str, index++); 16 | } 17 | } 18 | 19 | // Generate the array of unique strings. 20 | // Note, Maps preserve the insertion order of their elements 21 | const uniqueValuesArray = Array.from(uniqueValuesMap.keys()); 22 | 23 | // Build index array 24 | let indices = new Uint32Array(originalArray.length); 25 | originalArray.forEach((str, i) => { 26 | indices[i] = uniqueValuesMap.get(str); 27 | }); 28 | 29 | return { 30 | values: uniqueValuesArray, 31 | indices, 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /avenger-vega-renderer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "avenger-vega-renderer", 3 | "version": "0.0.8", 4 | "description": "", 5 | "main": "js/index.js", 6 | "files": [ 7 | "js/**/*.js", 8 | "lib/" 9 | ], 10 | "scripts": { 11 | "type-check": "tsc" 12 | }, 13 | "peerDependencies": { 14 | "vega-scenegraph": "^4.11.2", 15 | "vega-util": "^1.17.2" 16 | }, 17 | "devDependencies": { 18 | "typescript": "^5" 19 | }, 20 | "keywords": [], 21 | "author": "", 22 | "license": "ISC" 23 | } -------------------------------------------------------------------------------- /avenger-vega-renderer/src/marks/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod arc; 2 | pub mod area; 3 | pub mod group; 4 | pub mod image; 5 | pub mod line; 6 | pub mod path; 7 | pub mod rect; 8 | pub mod rule; 9 | pub mod symbol; 10 | pub mod text; 11 | pub mod trail; 12 | pub mod util; 13 | -------------------------------------------------------------------------------- /avenger-vega-renderer/src/marks/trail.rs: -------------------------------------------------------------------------------- 1 | use avenger_scenegraph::marks::trail::SceneTrailMark as RsTrailMark; 2 | use avenger_scenegraph::marks::value::EncodingValue; 3 | use avenger_vega::marks::values::CssColorOrGradient; 4 | use gloo_utils::format::JsValueSerdeExt; 5 | use wasm_bindgen::prelude::wasm_bindgen; 6 | use wasm_bindgen::{JsError, JsValue}; 7 | 8 | #[wasm_bindgen] 9 | pub struct TrailMark { 10 | inner: RsTrailMark, 11 | } 12 | 13 | impl TrailMark { 14 | pub fn build(self) -> RsTrailMark { 15 | self.inner 16 | } 17 | } 18 | 19 | #[wasm_bindgen] 20 | impl TrailMark { 21 | #[wasm_bindgen(constructor)] 22 | pub fn new(len: u32, clip: bool, name: Option, zindex: Option) -> Self { 23 | Self { 24 | inner: RsTrailMark { 25 | len, 26 | clip, 27 | zindex, 28 | name: name.unwrap_or_default(), 29 | ..Default::default() 30 | }, 31 | } 32 | } 33 | 34 | /// Set fill color 35 | /// 36 | /// @param {string|object} color 37 | /// @param {number} opacity 38 | #[wasm_bindgen(skip_jsdoc)] 39 | pub fn set_stroke(&mut self, color: JsValue, opacity: f32) -> Result<(), JsError> { 40 | let stroke: Option = color.into_serde()?; 41 | if let Some(stroke) = stroke { 42 | let fill = stroke 43 | .to_color_or_grad(opacity, &mut self.inner.gradients) 44 | .map_err(|_| JsError::new("Failed to parse stroke color"))?; 45 | self.inner.stroke = fill; 46 | } 47 | Ok(()) 48 | } 49 | 50 | pub fn set_xy(&mut self, x: Vec, y: Vec) { 51 | self.inner.x = EncodingValue::Array { values: x }; 52 | self.inner.y = EncodingValue::Array { values: y }; 53 | } 54 | 55 | pub fn set_defined(&mut self, defined: Vec) -> Result<(), JsError> { 56 | self.inner.defined = EncodingValue::Array { 57 | values: defined.into_iter().map(|d| d != 0).collect(), 58 | }; 59 | Ok(()) 60 | } 61 | 62 | pub fn set_size(&mut self, size: Vec) { 63 | self.inner.size = EncodingValue::Array { values: size }; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /avenger-vega-renderer/src/scene.rs: -------------------------------------------------------------------------------- 1 | // use avenger_scenegraph::error::AvengerError; 2 | // 3 | // use avenger_scenegraph::marks::mark::SceneMark; 4 | // use avenger_scenegraph::marks::symbol::SymbolShape; 5 | // use avenger_scenegraph::marks::text::{FontStyleSpec, FontWeightSpec, TextAlignSpec, TextBaselineSpec}; 6 | // use avenger_scenegraph::marks::value::{ColorOrGradient, EncodingValue, Gradient, StrokeCap}; 7 | // use avenger_scenegraph::marks::{ 8 | // rule::RuleMark as RsRuleMark, symbol::SymbolMark as RsSymbolMark, text::TextMark as RsTextMark, 9 | // }; 10 | 11 | // use avenger_vega::error::AvengerVegaError; 12 | // use avenger_vega::marks::values::{CssColorOrGradient, StrokeDashSpec}; 13 | // use gloo_utils::format::JsValueSerdeExt; 14 | 15 | use crate::marks::group::GroupMark; 16 | use avenger_scenegraph::scene_graph::SceneGraph as RsSceneGraph; 17 | use wasm_bindgen::prelude::*; 18 | 19 | #[wasm_bindgen] 20 | pub struct SceneGraph { 21 | inner: RsSceneGraph, 22 | } 23 | 24 | #[wasm_bindgen] 25 | impl SceneGraph { 26 | #[wasm_bindgen(constructor)] 27 | pub fn new(width: f32, height: f32, origin_x: f32, origin_y: f32) -> Self { 28 | Self { 29 | inner: RsSceneGraph { 30 | width, 31 | height, 32 | origin: [origin_x, origin_y], 33 | groups: Vec::new(), 34 | }, 35 | } 36 | } 37 | 38 | pub fn add_group(&mut self, group: GroupMark) { 39 | self.inner.groups.push(group.build()) 40 | } 41 | } 42 | 43 | impl SceneGraph { 44 | pub fn build(self) -> RsSceneGraph { 45 | self.inner 46 | } 47 | 48 | pub fn width(&self) -> f32 { 49 | self.inner.width 50 | } 51 | 52 | pub fn height(&self) -> f32 { 53 | self.inner.height 54 | } 55 | 56 | pub fn origin(&self) -> [f32; 2] { 57 | self.inner.origin 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /avenger-vega-renderer/test/test_server/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /avenger-vega-renderer/test/test_server/bootstrap.js: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | // A dependency graph that contains any wasm must all be imported 19 | // asynchronously. This `bootstrap.js` file does the single async import, so 20 | // that no one else needs to worry about it again. 21 | import("./index.js") 22 | .catch(e => console.error("Error importing `index.js`:", e)); 23 | -------------------------------------------------------------------------------- /avenger-vega-renderer/test/test_server/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test Avenger 6 | 7 | 8 |

Avenger test app

9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /avenger-vega-renderer/test/test_server/index.js: -------------------------------------------------------------------------------- 1 | import vegaEmbed from 'vega-embed'; 2 | import { registerVegaRenderer } from 'avenger-vega-renderer'; 3 | import { renderModule } from 'vega-scenegraph'; 4 | 5 | // Simple initial chart spec that will be replaced using playwright 6 | const spec = { 7 | "$schema": "https://vega.github.io/schema/vega/v5.json", 8 | "description": "A basic stacked bar chart example.", 9 | "width": 200, 10 | "height": 200, 11 | "padding": 5, 12 | "title": "Avenger test harness", 13 | "background": "lightgray", 14 | }; 15 | 16 | // Make the "avenger" renderer available 17 | registerVegaRenderer(renderModule, true); 18 | 19 | // Make vega embed available globally so that we can call it using playwright 20 | window.vegaEmbed = vegaEmbed; 21 | vegaEmbed('#plot-container', spec, { 22 | renderer: "canvas", 23 | }).catch(console.error); 24 | -------------------------------------------------------------------------------- /avenger-vega-renderer/test/test_server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vega-renderer", 3 | "version": "0.1.0", 4 | "description": "create an app to consume rust-generated wasm packages", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "webpack --config webpack.config.js", 8 | "start": "webpack-dev-server" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/rustwasm/create-wasm-app.git" 13 | }, 14 | "keywords": [ 15 | "webassembly", 16 | "wasm", 17 | "rust", 18 | "webpack" 19 | ], 20 | "author": "Jon Mease ", 21 | "license": "(MIT OR Apache-2.0)", 22 | "bugs": { 23 | "url": "https://github.com/rustwasm/create-wasm-app/issues" 24 | }, 25 | "homepage": "https://github.com/rustwasm/create-wasm-app#readme", 26 | "dependencies": { 27 | "avenger-vega-renderer": "../../dist", 28 | "vega-embed": "^6.24.0" 29 | }, 30 | "devDependencies": { 31 | "webpack": "5.88.2", 32 | "webpack-cli": "5.1.4", 33 | "webpack-dev-server": "4.15.1", 34 | "copy-webpack-plugin": "6.4.1" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /avenger-vega-renderer/test/test_server/webpack.config.js: -------------------------------------------------------------------------------- 1 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 2 | const path = require('path'); 3 | 4 | module.exports = { 5 | entry: "./bootstrap.js", 6 | output: { 7 | path: path.resolve(__dirname, "dist"), 8 | filename: "bootstrap.js", 9 | }, 10 | mode: "development", 11 | devtool: 'source-map', // Enables source maps 12 | experiments: { 13 | topLevelAwait: true, 14 | asyncWebAssembly: true, 15 | }, 16 | plugins: [ 17 | new CopyWebpackPlugin({ 18 | patterns: [ 19 | { from: 'index.html', to: 'index.html' }, 20 | ], 21 | }), 22 | ], 23 | devServer: { 24 | client: { 25 | overlay: false, // Disabling the error overlay 26 | }, 27 | headers: { 28 | 'Access-Control-Allow-Origin': '*', // Allows access from any origin 29 | 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS', // Specify allowed methods 30 | 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization' // Specify allowed headers 31 | }, 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /avenger-vega-renderer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "checkJs": true, 5 | "noEmit": true, 6 | "baseUrl": "./", 7 | "target": "ES2015", 8 | "paths": { 9 | "*": ["js/marks/*"] 10 | } 11 | }, 12 | "include": [ 13 | "js/marks/**/*" 14 | ] 15 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "avenger-vega-test-data" 3 | version = "0.0.8" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | vl-convert-rs = "1.2.3" 8 | pollster = "0.3" 9 | 10 | [dependencies.serde_json] 11 | workspace = true 12 | -------------------------------------------------------------------------------- /avenger-vega-test-data/README.md: -------------------------------------------------------------------------------- 1 | ## Generate Test Data 2 | This is a binary crate responsible for generating image baseline vega test data for the avenger-wgpu renderer. 3 | 4 | From the project root 5 | ``` 6 | cargo run -p avenger-vega-test-data 7 | ``` 8 | 9 | ## How it works 10 | A collection of Vega specs are located under `avenger-vega-test-data/vega-specs` inside category directories. 11 | For example: `avenger-vega-test-data/vega-specs/rect/stacked_bar.vg.json`. 12 | 13 | The main binary entry point scans this directory and for each Vega spec it uses 14 | [`vl-convert-rs`](https://github.com/vega/vl-convert) to 15 | output the following three files in matching category directory under `avenger-vega-test-data/vega-scenegraphs` 16 | 1. `{spec_name}.sg.json`: This is the JSON representation of the scenegraph that Vega generates for this Vega spec. 17 | This is used as the input for the wgpu renderer. 18 | 2. `{spec_name}.dims.json`: This JSON file contains the final chart width, height, and origin values. 19 | These are values that are not contained in the scenegraph, but passed as arguments to the renderer when registered with Vega. 20 | 3. `{spec_name}.png`: PNG rendering of the Vega spec as created by vl-convert. To generate this, vl-convert exports the 21 | chart to SVG and then renders the SVG to PNG using [resvg](https://github.com/RazrFalcon/resvg). This PNG image serves 22 | as the baseline that wgpu rendered PNGs are compared to. 23 | 24 | Image baselines are tested in `avenger-wgpu/tests/test_image_baselines.rs`. Image similarity is measured 25 | using [DSSIM](https://github.com/kornelski/dssim). 26 | -------------------------------------------------------------------------------- /avenger-vega-test-data/fonts/Caveat/Caveat-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/fonts/Caveat/Caveat-VariableFont_wght.ttf -------------------------------------------------------------------------------- /avenger-vega-test-data/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 | -------------------------------------------------------------------------------- /avenger-vega-test-data/fonts/Caveat/static/Caveat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/fonts/Caveat/static/Caveat-Bold.ttf -------------------------------------------------------------------------------- /avenger-vega-test-data/fonts/Caveat/static/Caveat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/fonts/Caveat/static/Caveat-Medium.ttf -------------------------------------------------------------------------------- /avenger-vega-test-data/fonts/Caveat/static/Caveat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/fonts/Caveat/static/Caveat-Regular.ttf -------------------------------------------------------------------------------- /avenger-vega-test-data/fonts/Caveat/static/Caveat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/fonts/Caveat/static/Caveat-SemiBold.ttf -------------------------------------------------------------------------------- /avenger-vega-test-data/images/VG_Black@512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/VG_Black@512.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/VG_Color@512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/VG_Color@512.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/VL_Black@512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/VL_Black@512.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/VL_Color@512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/VL_Color@512.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/VegaFusion-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/VegaFusion-512x512.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/js_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/js_logo.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/matplotlib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/matplotlib.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/python_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/python_logo.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/rust_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/rust_logo.png -------------------------------------------------------------------------------- /avenger-vega-test-data/images/scipy_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/images/scipy_logo.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/arc_with_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/arc/arc_with_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/arc_with_stroke.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 210, 3 | "height": 210, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 100, 20 | "y": 100, 21 | "outerRadius": 80, 22 | "innerRadius": 20, 23 | "startAngle": 5, 24 | "endAngle": 7, 25 | "fill": "green", 26 | "fillOpacity": 0.6, 27 | "stroke": "deeppink", 28 | "strokeWidth": 4 29 | }, 30 | { 31 | "x": 100, 32 | "y": 100, 33 | "outerRadius": 80, 34 | "innerRadius": 20, 35 | "startAngle": 8, 36 | "endAngle": 9, 37 | "fill": "blue", 38 | "fillOpacity": 0.6, 39 | "stroke": "deeppink", 40 | "strokeWidth": 4 41 | } 42 | ], 43 | "marktype": "arc", 44 | "name": "marks", 45 | "role": "mark", 46 | "zindex": 0 47 | } 48 | ], 49 | "fill": "transparent", 50 | "x": 0, 51 | "y": 0, 52 | "width": 200, 53 | "height": 200 54 | } 55 | ], 56 | "marktype": "group", 57 | "name": "root", 58 | "role": "frame", 59 | "zindex": 0 60 | } 61 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/arcs_with_variable_outer_radius.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/arc/arcs_with_variable_outer_radius.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/arcs_with_variable_outer_radius_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/arc/arcs_with_variable_outer_radius_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/single_arc_no_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/arc/single_arc_no_inner.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/single_arc_no_inner.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 110, 3 | "height": 110, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 50, 20 | "y": 50, 21 | "outerRadius": 50, 22 | "startAngle": 5, 23 | "endAngle": 6.29, 24 | "fill": "lightblue" 25 | } 26 | ], 27 | "marktype": "arc", 28 | "name": "marks", 29 | "role": "mark", 30 | "zindex": 0 31 | } 32 | ], 33 | "fill": "transparent", 34 | "x": 0, 35 | "y": 0, 36 | "width": 100, 37 | "height": 100 38 | } 39 | ], 40 | "marktype": "group", 41 | "name": "root", 42 | "role": "frame", 43 | "zindex": 0 44 | } 45 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 110, 3 | "height": 110, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "fill": "#4c78a8", 20 | "x": 50, 21 | "y": 50, 22 | "outerRadius": 10, 23 | "innerRadius": 30, 24 | "startAngle": -0.5, 25 | "endAngle": 1.7 26 | } 27 | ], 28 | "marktype": "arc", 29 | "name": "marks", 30 | "role": "mark", 31 | "zindex": 0 32 | }, 33 | { 34 | "clip": false, 35 | "interactive": true, 36 | "items": [ 37 | { 38 | "size": 64, 39 | "x": 50, 40 | "y": 50, 41 | "fill": "crimson" 42 | } 43 | ], 44 | "marktype": "symbol", 45 | "role": "mark", 46 | "zindex": 0 47 | } 48 | ], 49 | "fill": "transparent", 50 | "x": 0, 51 | "y": 0, 52 | "width": 100, 53 | "height": 100 54 | } 55 | ], 56 | "marktype": "group", 57 | "name": "root", 58 | "role": "frame", 59 | "zindex": 0 60 | } 61 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius_wrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius_wrap.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius_wrap.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 110, 3 | "height": 110, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "fill": "#4c78a8", 20 | "x": 50, 21 | "y": 50, 22 | "outerRadius": 10, 23 | "innerRadius": 30, 24 | "startAngle": 5, 25 | "endAngle": 7 26 | } 27 | ], 28 | "marktype": "arc", 29 | "name": "marks", 30 | "role": "mark", 31 | "zindex": 0 32 | }, 33 | { 34 | "clip": false, 35 | "interactive": true, 36 | "items": [ 37 | { 38 | "size": 64, 39 | "x": 50, 40 | "y": 50, 41 | "fill": "crimson" 42 | } 43 | ], 44 | "marktype": "symbol", 45 | "role": "mark", 46 | "zindex": 0 47 | } 48 | ], 49 | "fill": "transparent", 50 | "x": 0, 51 | "y": 0, 52 | "width": 100, 53 | "height": 100 54 | } 55 | ], 56 | "marktype": "group", 57 | "name": "root", 58 | "role": "frame", 59 | "zindex": 0 60 | } 61 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius_wrap_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius_wrap_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/arc/single_arc_with_inner_radius_wrap_stroke.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 110, 3 | "height": 110, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 50, 20 | "y": 50, 21 | "outerRadius": 10, 22 | "innerRadius": 30, 23 | "startAngle": 5, 24 | "endAngle": 6.29, 25 | "fill": "lightblue", 26 | "stroke": "deeppink", 27 | "strokeWidth": 3 28 | } 29 | ], 30 | "marktype": "arc", 31 | "name": "marks", 32 | "role": "mark", 33 | "zindex": 0 34 | }, 35 | { 36 | "clip": false, 37 | "interactive": true, 38 | "items": [ 39 | { 40 | "size": 64, 41 | "x": 50, 42 | "y": 50, 43 | "fill": "crimson" 44 | } 45 | ], 46 | "marktype": "symbol", 47 | "role": "mark", 48 | "zindex": 0 49 | } 50 | ], 51 | "fill": "transparent", 52 | "x": 0, 53 | "y": 0, 54 | "width": 100, 55 | "height": 100 56 | } 57 | ], 58 | "marktype": "group", 59 | "name": "root", 60 | "role": "frame", 61 | "zindex": 0 62 | } 63 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/area/100_percent_stacked_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/area/100_percent_stacked_area.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/area/simple_unemployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/area/simple_unemployment.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/area/simple_unemployment_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/area/simple_unemployment_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/area/stacked_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/area/stacked_area.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/area/streamgraph_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/area/streamgraph_area.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/area/with_undefined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/area/with_undefined.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/area/with_undefined_horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/area/with_undefined_horizontal.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/clip/bar_rounded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/clip/bar_rounded.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/clip/clip_mixed_marks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/clip/clip_mixed_marks.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/clip/clip_rounded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/clip/clip_rounded.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/clip/text_clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/clip/text_clip.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/clip/text_clip_rounded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/clip/text_clip_rounded.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/arc_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/arc_gradient.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/area_line_with_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/area_line_with_gradient.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/area_with_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/area_with_gradient.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/default_gradient_bars_rounded_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/default_gradient_bars_rounded_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/diagonal_gradient_bars_rounded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/diagonal_gradient_bars_rounded.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/heatmap_with_colorbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/heatmap_with_colorbar.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/path_with_stroke_gradients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/path_with_stroke_gradients.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/radial_concentric_gradient_bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/radial_concentric_gradient_bars.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/radial_offset_gradient_bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/radial_offset_gradient_bars.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/residuals_colorscale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/residuals_colorscale.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/rules_with_gradients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/rules_with_gradients.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/stroke_rect_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/stroke_rect_gradient.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/symbol_circles_gradient_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/symbol_circles_gradient_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/symbol_cross_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/symbol_cross_gradient.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/symbol_radial_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/symbol_radial_gradient.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/gradients/trail_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/gradients/trail_gradient.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/large_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/large_images.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/logos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/logos.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/logos_sized_aspect_false.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/logos_sized_aspect_false.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/logos_sized_aspect_false_align_baseline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/logos_sized_aspect_false_align_baseline.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/logos_sized_aspect_true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/logos_sized_aspect_true.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/logos_sized_aspect_true_align_baseline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/logos_sized_aspect_true_align_baseline.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/many_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/many_images.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/smooth_false.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/smooth_false.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/image/smooth_true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/image/smooth_true.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/connected_scatter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/connected_scatter.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/line_dashed_butt_undefined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/line_dashed_butt_undefined.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/line_dashed_round_undefined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/line_dashed_round_undefined.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/line_dashed_square_undefined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/line_dashed_square_undefined.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/lines_with_open_symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/lines_with_open_symbols.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/simple_dashed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/simple_dashed.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/simple_line_butt_cap_miter_join.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/simple_line_butt_cap_miter_join.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/simple_line_round_cap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/simple_line_round_cap.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/simple_line_square_cap_bevel_join.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/simple_line_square_cap_bevel_join.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/stocks-legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/stocks-legend.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/stocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/stocks.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/line/stocks_dashed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/line/stocks_dashed.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/multi_path_no_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/path/multi_path_no_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/multi_path_no_stroke.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 310, 3 | "height": 310, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 20, 20 | "y": 30, 21 | "scaleX": 15, 22 | "scaleY": 15, 23 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 24 | "fill": "green", 25 | "fillOpacity": 0.6, 26 | "angle": 0 27 | }, 28 | { 29 | "x": 40, 30 | "y": 30, 31 | "scaleX": 15, 32 | "scaleY": 30, 33 | "path": "M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z", 34 | "fill": "blue", 35 | "fillOpacity": 0.6, 36 | "angle": 10 37 | }, 38 | { 39 | "x": 150, 40 | "y": 170, 41 | "scaleX": 30, 42 | "scaleY": 15, 43 | "path": "M-1,-1L1,-1L1,1L-1,1Z", 44 | "fill": "darkorange", 45 | "fillOpacity": 0.6, 46 | "angle": -15 47 | } 48 | ], 49 | "marktype": "path", 50 | "name": "marks", 51 | "role": "mark", 52 | "zindex": 0 53 | } 54 | ], 55 | "fill": "transparent", 56 | "x": 0, 57 | "y": 0, 58 | "width": 300, 59 | "height": 300 60 | } 61 | ], 62 | "marktype": "group", 63 | "name": "root", 64 | "role": "frame", 65 | "zindex": 0 66 | } 67 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/multi_path_with_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/path/multi_path_with_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/multi_path_with_stroke.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 311, 3 | "height": 310, 4 | "origin": [ 5 | 6, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 20, 20 | "y": 30, 21 | "scaleX": 15, 22 | "scaleY": 15, 23 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 24 | "fill": "green", 25 | "fillOpacity": 0.6, 26 | "angle": 0, 27 | "stroke": "deeppink", 28 | "strokeWidth": 3 29 | }, 30 | { 31 | "x": 40, 32 | "y": 30, 33 | "scaleX": 15, 34 | "scaleY": 30, 35 | "path": "M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z", 36 | "fill": "blue", 37 | "fillOpacity": 0.6, 38 | "angle": 10, 39 | "stroke": "deeppink", 40 | "strokeWidth": 3 41 | }, 42 | { 43 | "x": 150, 44 | "y": 170, 45 | "scaleX": 30, 46 | "scaleY": 15, 47 | "path": "M-1,-1L1,-1L1,1L-1,1Z", 48 | "fill": "darkorange", 49 | "fillOpacity": 0.6, 50 | "angle": -15, 51 | "stroke": "deeppink", 52 | "strokeWidth": 3 53 | } 54 | ], 55 | "marktype": "path", 56 | "name": "marks", 57 | "role": "mark", 58 | "zindex": 0 59 | } 60 | ], 61 | "fill": "transparent", 62 | "x": 0, 63 | "y": 0, 64 | "width": 300, 65 | "height": 300 66 | } 67 | ], 68 | "marktype": "group", 69 | "name": "root", 70 | "role": "frame", 71 | "zindex": 0 72 | } 73 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/multi_path_with_stroke_no_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/path/multi_path_with_stroke_no_fill.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/multi_path_with_stroke_no_fill.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 311, 3 | "height": 310, 4 | "origin": [ 5 | 6, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 20, 20 | "y": 30, 21 | "scaleX": 15, 22 | "scaleY": 15, 23 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 24 | "angle": 0, 25 | "stroke": "deeppink", 26 | "strokeWidth": 3 27 | }, 28 | { 29 | "x": 40, 30 | "y": 30, 31 | "scaleX": 15, 32 | "scaleY": 30, 33 | "path": "M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z", 34 | "angle": 10, 35 | "stroke": "deeppink", 36 | "strokeWidth": 3 37 | }, 38 | { 39 | "x": 150, 40 | "y": 170, 41 | "scaleX": 30, 42 | "scaleY": 15, 43 | "path": "M-1,-1L1,-1L1,1L-1,1Z", 44 | "angle": -15, 45 | "stroke": "deeppink", 46 | "strokeWidth": 3 47 | } 48 | ], 49 | "marktype": "path", 50 | "name": "marks", 51 | "role": "mark", 52 | "zindex": 0 53 | } 54 | ], 55 | "fill": "transparent", 56 | "x": 0, 57 | "y": 0, 58 | "width": 300, 59 | "height": 300 60 | } 61 | ], 62 | "marktype": "group", 63 | "name": "root", 64 | "role": "frame", 65 | "zindex": 0 66 | } 67 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/single_path_no_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/path/single_path_no_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/single_path_no_stroke.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 210, 3 | "height": 210, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 50, 20 | "y": 70, 21 | "scaleX": 15, 22 | "scaleY": 15, 23 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 24 | "fill": "green", 25 | "fillOpacity": 0.6, 26 | "angle": 0 27 | }, 28 | { 29 | "x": 90, 30 | "y": 90, 31 | "scaleX": 15, 32 | "scaleY": 30, 33 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 34 | "fill": "blue", 35 | "fillOpacity": 0.6, 36 | "angle": 15 37 | }, 38 | { 39 | "x": 130, 40 | "y": 130, 41 | "scaleX": 30, 42 | "scaleY": 15, 43 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 44 | "fill": "darkorange", 45 | "fillOpacity": 0.6, 46 | "angle": -20 47 | } 48 | ], 49 | "marktype": "path", 50 | "name": "marks", 51 | "role": "mark", 52 | "zindex": 0 53 | } 54 | ], 55 | "fill": "transparent", 56 | "x": 0, 57 | "y": 0, 58 | "width": 200, 59 | "height": 200 60 | } 61 | ], 62 | "marktype": "group", 63 | "name": "root", 64 | "role": "frame", 65 | "zindex": 0 66 | } 67 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/single_path_with_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/path/single_path_with_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/single_path_with_stroke.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 210, 3 | "height": 210, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 50, 20 | "y": 70, 21 | "scaleX": 15, 22 | "scaleY": 15, 23 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 24 | "fill": "green", 25 | "fillOpacity": 0.6, 26 | "angle": 0, 27 | "stroke": "deeppink", 28 | "strokeWidth": 3 29 | }, 30 | { 31 | "x": 90, 32 | "y": 90, 33 | "scaleX": 15, 34 | "scaleY": 30, 35 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 36 | "fill": "blue", 37 | "fillOpacity": 0.6, 38 | "angle": 15, 39 | "stroke": "deeppink", 40 | "strokeWidth": 3 41 | }, 42 | { 43 | "x": 130, 44 | "y": 130, 45 | "scaleX": 30, 46 | "scaleY": 15, 47 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 48 | "fill": "darkorange", 49 | "fillOpacity": 0.6, 50 | "angle": -20, 51 | "stroke": "deeppink", 52 | "strokeWidth": 3 53 | } 54 | ], 55 | "marktype": "path", 56 | "name": "marks", 57 | "role": "mark", 58 | "zindex": 0 59 | } 60 | ], 61 | "fill": "transparent", 62 | "x": 0, 63 | "y": 0, 64 | "width": 200, 65 | "height": 200 66 | } 67 | ], 68 | "marktype": "group", 69 | "name": "root", 70 | "role": "frame", 71 | "zindex": 0 72 | } 73 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/single_path_with_stroke_no_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/path/single_path_with_stroke_no_fill.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/path/single_path_with_stroke_no_fill.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 210, 3 | "height": 210, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 50, 20 | "y": 70, 21 | "scaleX": 15, 22 | "scaleY": 15, 23 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 24 | "angle": 0, 25 | "stroke": "deeppink", 26 | "strokeWidth": 3 27 | }, 28 | { 29 | "x": 90, 30 | "y": 90, 31 | "scaleX": 15, 32 | "scaleY": 30, 33 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 34 | "angle": 15, 35 | "stroke": "deeppink", 36 | "strokeWidth": 3 37 | }, 38 | { 39 | "x": 130, 40 | "y": 130, 41 | "scaleX": 30, 42 | "scaleY": 15, 43 | "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z", 44 | "angle": -20, 45 | "stroke": "deeppink", 46 | "strokeWidth": 3 47 | } 48 | ], 49 | "marktype": "path", 50 | "name": "marks", 51 | "role": "mark", 52 | "zindex": 0 53 | } 54 | ], 55 | "fill": "transparent", 56 | "x": 0, 57 | "y": 0, 58 | "width": 200, 59 | "height": 200 60 | } 61 | ], 62 | "marktype": "group", 63 | "name": "root", 64 | "role": "frame", 65 | "zindex": 0 66 | } 67 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rect/heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rect/heatmap.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar_rounded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar_rounded.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar_rounded_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar_rounded_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar_rounded_stroke_opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar_rounded_stroke_opacity.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rect/stacked_bar_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rule/dashed_rules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rule/dashed_rules.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rule/dashed_rules.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 410, 3 | "height": 410, 4 | "origin": [ 5 | 5, 6 | 5 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "strokeWidth": 8, 20 | "stroke": "orange", 21 | "x": 340, 22 | "x2": 60, 23 | "y": 15, 24 | "y2": 380, 25 | "opacity": 0.7, 26 | "strokeCap": "butt", 27 | "strokeDash": "12 8,4" 28 | }, 29 | { 30 | "strokeWidth": 4, 31 | "stroke": "blue", 32 | "x": 20, 33 | "x2": 320, 34 | "y": 15, 35 | "y2": 340, 36 | "opacity": 0.7, 37 | "strokeCap": "square", 38 | "strokeDash": "8,16" 39 | }, 40 | { 41 | "strokeWidth": 6, 42 | "stroke": "green", 43 | "x": 80, 44 | "x2": 220, 45 | "y": 15, 46 | "y2": 380, 47 | "opacity": 0.7, 48 | "strokeCap": "round", 49 | "strokeDash": "12" 50 | } 51 | ], 52 | "marktype": "rule", 53 | "name": "marks", 54 | "role": "mark", 55 | "zindex": 0 56 | } 57 | ], 58 | "fill": "transparent", 59 | "stroke": "transparent", 60 | "x": 0, 61 | "y": 0, 62 | "width": 400, 63 | "height": 400 64 | } 65 | ], 66 | "marktype": "group", 67 | "name": "root", 68 | "role": "frame", 69 | "zindex": 0 70 | } 71 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rule/wide_rule_axes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rule/wide_rule_axes.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rule/wide_transparent_caps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/rule/wide_transparent_caps.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/rule/wide_transparent_caps.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 210, 3 | "height": 215, 4 | "origin": [ 5 | 5, 6 | 10 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "strokeWidth": 12, 20 | "stroke": "orange", 21 | "x": 140, 22 | "x2": 60, 23 | "y": 15, 24 | "y2": 180, 25 | "opacity": 0.5, 26 | "strokeCap": "butt" 27 | }, 28 | { 29 | "strokeWidth": 16, 30 | "stroke": "blue", 31 | "x": 20, 32 | "x2": 120, 33 | "y": 15, 34 | "y2": 140, 35 | "opacity": 0.5, 36 | "strokeCap": "square" 37 | }, 38 | { 39 | "strokeWidth": 20, 40 | "stroke": "green", 41 | "x": 50, 42 | "x2": 120, 43 | "y": 15, 44 | "y2": 180, 45 | "opacity": 0.5, 46 | "strokeCap": "round" 47 | } 48 | ], 49 | "marktype": "rule", 50 | "name": "marks", 51 | "role": "mark", 52 | "zindex": 0 53 | } 54 | ], 55 | "fill": "transparent", 56 | "stroke": "transparent", 57 | "x": 0, 58 | "y": 0, 59 | "width": 200, 60 | "height": 200 61 | } 62 | ], 63 | "marktype": "group", 64 | "name": "root", 65 | "role": "frame", 66 | "zindex": 0 67 | } 68 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/shape/london_tubes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/shape/london_tubes.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/shape/us-counties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/shape/us-counties.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/shape/us-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/shape/us-map.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/shape/world-natural-earth-projection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/shape/world-natural-earth-projection.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_arrow.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_circle.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_circle_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_circle_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_circle_stroke_no_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_circle_stroke_no_fill.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_cross.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_cross_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_cross_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_diamonds.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_path.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_path_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_path_star.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_path_star_stroke_no_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_path_star_stroke_no_fill.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_square.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle-down.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle-left.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle-right.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle-up.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_triangle.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_wedge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/binned_scatter_wedge.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/mixed_symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/mixed_symbols.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/scatter_transparent_stroke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/scatter_transparent_stroke.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/scatter_transparent_stroke_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/scatter_transparent_stroke_star.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/wedge_angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/wedge_angle.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/wedge_stroke_angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/wedge_stroke_angle.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/wind_vector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/wind_vector.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/zindex_circles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/symbol/zindex_circles.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/symbol/zindex_circles.sg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 115, 3 | "height": 100, 4 | "origin": [ 5 | 15, 6 | 0 7 | ], 8 | "scenegraph": { 9 | "clip": false, 10 | "interactive": true, 11 | "items": [ 12 | { 13 | "items": [ 14 | { 15 | "clip": false, 16 | "interactive": true, 17 | "items": [ 18 | { 19 | "x": 30, 20 | "y": 40, 21 | "zindex": 3, 22 | "shape": "circle", 23 | "fill": "red", 24 | "stroke": "black", 25 | "strokeWidth": 3, 26 | "size": 600, 27 | "angle": 0 28 | }, 29 | { 30 | "x": 30, 31 | "y": 40, 32 | "zindex": 1, 33 | "shape": "circle", 34 | "fill": "blue", 35 | "stroke": "black", 36 | "strokeWidth": 3, 37 | "size": 1200, 38 | "angle": 30 39 | }, 40 | { 41 | "x": 10, 42 | "y": 40, 43 | "zindex": 0, 44 | "shape": "circle", 45 | "fill": "green", 46 | "stroke": "black", 47 | "strokeWidth": 3, 48 | "size": 1800, 49 | "angle": 90 50 | }, 51 | { 52 | "x": 50, 53 | "y": 40, 54 | "zindex": 2, 55 | "shape": "circle", 56 | "fill": "aqua", 57 | "stroke": "black", 58 | "strokeWidth": 3, 59 | "size": 2200, 60 | "angle": 120 61 | }, 62 | { 63 | "x": 30, 64 | "y": 40, 65 | "zindex": 0, 66 | "shape": "circle", 67 | "fill": "pink", 68 | "stroke": "black", 69 | "strokeWidth": 3, 70 | "size": 2800, 71 | "angle": 180 72 | } 73 | ], 74 | "marktype": "symbol", 75 | "role": "mark", 76 | "zindex": 0 77 | } 78 | ], 79 | "x": 0, 80 | "y": 0, 81 | "width": 100, 82 | "height": 100 83 | } 84 | ], 85 | "marktype": "group", 86 | "name": "root", 87 | "role": "frame", 88 | "zindex": 0 89 | } 90 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/text/arc_radial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/text/arc_radial.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/text/bar_axis_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/text/bar_axis_labels.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/text/emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/text/emoji.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/text/lasagna_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/text/lasagna_plot.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/text/letter_scatter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/text/letter_scatter.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/text/text_alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/text/text_alignment.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/text/text_rotation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/text/text_rotation.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/trail/trail_stocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/trail/trail_stocks.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/trail/trail_stocks_opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/trail/trail_stocks_opacity.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/bar_chart_trellis_compact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/bar_chart_trellis_compact.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/circle_binned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/circle_binned.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/circle_binned_base_url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/circle_binned_base_url.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/custom_projection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/custom_projection.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/float_font_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/float_font_size.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/font_with_quotes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/font_with_quotes.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/geoScale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/geoScale.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/line_with_log_scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/line_with_log_scale.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/long_legend_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/long_legend_label.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/lookup_urls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/lookup_urls.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/maptile_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/maptile_background.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/no_text_in_font_metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/no_text_in_font_metrics.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/numeric_font_weight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/numeric_font_weight.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/quakes_initial_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/quakes_initial_selection.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/remote_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/remote_images.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/seattle-weather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/seattle-weather.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/stacked_bar_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/stacked_bar_h.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/stocks_locale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/stocks_locale.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-scenegraphs/vl-convert/table_heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/avenger-vega-test-data/vega-scenegraphs/vl-convert/table_heatmap.png -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/arc/arc_with_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 200, 7 | "height": 200, 8 | "style": "view", 9 | "data": [{ 10 | "name": "data_0", 11 | "values": [ 12 | {"startAngle": 5, "endAngle": 7, "fill": "green"}, 13 | {"startAngle": 8, "endAngle": 9, "fill": "blue"} 14 | ] 15 | }], 16 | "marks": [ 17 | { 18 | "name": "marks", 19 | "type": "arc", 20 | "from": {"data": "data_0"}, 21 | "style": ["arc"], 22 | "encode": { 23 | "update": { 24 | "x": {"value": 100}, 25 | "y": {"value": 100}, 26 | "outerRadius": {"value": 80}, 27 | "innerRadius": {"value": 20}, 28 | "startAngle": {"field": "startAngle"}, 29 | "endAngle": {"field": "endAngle"}, 30 | "fill": {"field": "fill"}, 31 | "fillOpacity": {"value": 0.6}, 32 | "stroke": {"value": "deeppink"}, 33 | "strokeWidth": {"value": 4} 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/arc/single_arc_no_inner.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 100, 7 | "height": 100, 8 | "style": "view", 9 | "marks": [ 10 | { 11 | "name": "marks", 12 | "type": "arc", 13 | "style": ["arc"], 14 | "encode": { 15 | "update": { 16 | "x": {"value": 50}, 17 | "y": {"value": 50}, 18 | "outerRadius": {"value": 50}, 19 | "startAngle": {"value": 5}, 20 | "endAngle": {"value": 6.29}, 21 | "fill": {"value": "lightblue"} 22 | } 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/arc/single_arc_with_inner_radius.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 100, 7 | "height": 100, 8 | "style": "view", 9 | "marks": [ 10 | { 11 | "name": "marks", 12 | "type": "arc", 13 | "style": ["arc"], 14 | "encode": { 15 | "update": { 16 | "x": {"value": 50}, 17 | "y": {"value": 50}, 18 | "outerRadius": {"value": 10}, 19 | "innerRadius": {"value": 30}, 20 | "startAngle": {"value": -0.5}, 21 | "endAngle": {"value": 1.7} 22 | } 23 | } 24 | }, 25 | { 26 | "type": "symbol", 27 | "encode": { 28 | "update": { 29 | "x": {"value": 50}, 30 | "y": {"value": 50}, 31 | "fill": {"value": "crimson"} 32 | } 33 | } 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/arc/single_arc_with_inner_radius_wrap.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 100, 7 | "height": 100, 8 | "style": "view", 9 | "marks": [ 10 | { 11 | "name": "marks", 12 | "type": "arc", 13 | "style": ["arc"], 14 | "encode": { 15 | "update": { 16 | "x": {"value": 50}, 17 | "y": {"value": 50}, 18 | "outerRadius": {"value": 10}, 19 | "innerRadius": {"value": 30}, 20 | "startAngle": {"value": 5}, 21 | "endAngle": {"value": 7} 22 | } 23 | } 24 | }, 25 | { 26 | "type": "symbol", 27 | "encode": { 28 | "update": { 29 | "x": {"value": 50}, 30 | "y": {"value": 50}, 31 | "fill": {"value": "crimson"} 32 | } 33 | } 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/arc/single_arc_with_inner_radius_wrap_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 100, 7 | "height": 100, 8 | "style": "view", 9 | "marks": [ 10 | { 11 | "name": "marks", 12 | "type": "arc", 13 | "style": ["arc"], 14 | "encode": { 15 | "update": { 16 | "x": {"value": 50}, 17 | "y": {"value": 50}, 18 | "outerRadius": {"value": 10}, 19 | "innerRadius": {"value": 30}, 20 | "startAngle": {"value": 5}, 21 | "endAngle": {"value": 6.29}, 22 | "fill": {"value": "lightblue"}, 23 | "stroke": {"value": "deeppink"}, 24 | "strokeWidth": {"value": 3} 25 | } 26 | } 27 | }, 28 | { 29 | "type": "symbol", 30 | "encode": { 31 | "update": { 32 | "x": {"value": 50}, 33 | "y": {"value": 50}, 34 | "fill": {"value": "crimson"} 35 | } 36 | } 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/area/simple_unemployment.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/unemployment-across-industries.json", 13 | "format": {"type": "json", "parse": {"date": "date"}}, 14 | "transform": [ 15 | { 16 | "field": "date", 17 | "type": "timeunit", 18 | "units": ["year", "month"], 19 | "as": ["yearmonth_date", "yearmonth_date_end"] 20 | }, 21 | { 22 | "type": "aggregate", 23 | "groupby": ["yearmonth_date"], 24 | "ops": ["sum"], 25 | "fields": ["count"], 26 | "as": ["sum_count"] 27 | } 28 | ] 29 | } 30 | ], 31 | "marks": [ 32 | { 33 | "name": "marks", 34 | "type": "area", 35 | "style": ["area"], 36 | "sort": {"field": "datum[\"yearmonth_date\"]"}, 37 | "from": {"data": "source_0"}, 38 | "encode": { 39 | "update": { 40 | "orient": {"value": "vertical"}, 41 | "fill": {"value": "#4c78a8"}, 42 | "description": { 43 | "signal": "\"date (year-month): \" + (timeFormat(datum[\"yearmonth_date\"], '%Y')) + \"; count: \" + (format(datum[\"sum_count\"], \"\"))" 44 | }, 45 | "x": {"scale": "x", "field": "yearmonth_date"}, 46 | "y": {"scale": "y", "field": "sum_count"}, 47 | "y2": {"scale": "y", "value": 0}, 48 | "defined": { 49 | "signal": "isValid(datum[\"yearmonth_date\"]) && isFinite(+datum[\"yearmonth_date\"]) && isValid(datum[\"sum_count\"]) && isFinite(+datum[\"sum_count\"])" 50 | } 51 | } 52 | } 53 | } 54 | ], 55 | "scales": [ 56 | { 57 | "name": "x", 58 | "type": "time", 59 | "domain": {"data": "source_0", "field": "yearmonth_date"}, 60 | "range": [0, {"signal": "width"}] 61 | }, 62 | { 63 | "name": "y", 64 | "type": "linear", 65 | "domain": {"data": "source_0", "field": "sum_count"}, 66 | "range": [{"signal": "height"}, 0], 67 | "nice": true, 68 | "zero": true 69 | } 70 | ] 71 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/area/simple_unemployment_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/unemployment-across-industries.json", 13 | "format": {"type": "json", "parse": {"date": "date"}}, 14 | "transform": [ 15 | { 16 | "field": "date", 17 | "type": "timeunit", 18 | "units": ["year", "month"], 19 | "as": ["yearmonth_date", "yearmonth_date_end"] 20 | }, 21 | { 22 | "type": "aggregate", 23 | "groupby": ["yearmonth_date"], 24 | "ops": ["sum"], 25 | "fields": ["count"], 26 | "as": ["sum_count"] 27 | } 28 | ] 29 | } 30 | ], 31 | "marks": [ 32 | { 33 | "name": "marks", 34 | "type": "area", 35 | "style": ["area"], 36 | "sort": {"field": "datum[\"yearmonth_date\"]"}, 37 | "from": {"data": "source_0"}, 38 | "encode": { 39 | "update": { 40 | "orient": {"value": "vertical"}, 41 | "fill": {"value": "#4c78a8"}, 42 | "fillOpacity": {"value": 0.7}, 43 | "stroke": {"value": "deeppink"}, 44 | "strokeWidth": {"value": 4}, 45 | "description": { 46 | "signal": "\"date (year-month): \" + (timeFormat(datum[\"yearmonth_date\"], '%Y')) + \"; count: \" + (format(datum[\"sum_count\"], \"\"))" 47 | }, 48 | "x": {"scale": "x", "field": "yearmonth_date"}, 49 | "y": {"scale": "y", "field": "sum_count"}, 50 | "y2": {"scale": "y", "value": 0}, 51 | "defined": { 52 | "signal": "isValid(datum[\"yearmonth_date\"]) && isFinite(+datum[\"yearmonth_date\"]) && isValid(datum[\"sum_count\"]) && isFinite(+datum[\"sum_count\"])" 53 | } 54 | } 55 | } 56 | } 57 | ], 58 | "scales": [ 59 | { 60 | "name": "x", 61 | "type": "time", 62 | "domain": {"data": "source_0", "field": "yearmonth_date"}, 63 | "range": [0, {"signal": "width"}] 64 | }, 65 | { 66 | "name": "y", 67 | "type": "linear", 68 | "domain": {"data": "source_0", "field": "sum_count"}, 69 | "range": [{"signal": "height"}, 0], 70 | "nice": true, 71 | "zero": true 72 | } 73 | ] 74 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/area/with_undefined.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "values": [ 13 | {"u": 1, "v": 28, "defined": true}, 14 | {"u": 2, "v": 55, "defined": true}, 15 | {"u": 3, "v": 42, "defined": true}, 16 | {"u": 3.9, "v": 39, "defined": true}, 17 | {"u": 4, "v": 34, "defined": false}, 18 | {"u": 5, "v": 36, "defined": true}, 19 | {"u": 6, "v": 48, "defined": false}, 20 | {"u": 6.1, "v": 30, "defined": true}, 21 | {"u": 8, "v": 26, "defined": true}, 22 | {"u": 9, "v": 46, "defined": true} 23 | ] 24 | }, 25 | { 26 | "name": "data_0", 27 | "source": "source_0", 28 | "transform": [ 29 | {"type": "formula", "expr": "toNumber(datum[\"u\"])", "as": "u"} 30 | ] 31 | } 32 | ], 33 | "marks": [ 34 | { 35 | "name": "marks", 36 | "type": "area", 37 | "sort": {"field": "datum[\"u\"]"}, 38 | "from": {"data": "data_0"}, 39 | "encode": { 40 | "update": { 41 | "fill": {"value": "green"}, 42 | "fillOpacity": {"value": 0.5}, 43 | "strokeWidth": {"value": 4}, 44 | "stroke": {"value": "crimson"}, 45 | "strokeOpacity": {"value": 0.7}, 46 | "x": {"scale": "x", "field": "u"}, 47 | "y": {"scale": "y", "field": "v"}, 48 | "y2": {"value": 90}, 49 | "defined": {"field": "defined"} 50 | } 51 | } 52 | } 53 | ], 54 | "scales": [ 55 | { 56 | "name": "x", 57 | "type": "linear", 58 | "domain": [1, 10], 59 | "range": [0, {"signal": "width"}], 60 | "nice": true 61 | }, 62 | { 63 | "name": "y", 64 | "type": "linear", 65 | "domain": [20, 70], 66 | "range": [{"signal": "height"}, 0], 67 | "nice": true 68 | } 69 | ] 70 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/area/with_undefined_horizontal.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "values": [ 13 | {"u": 1, "v": 28, "defined": true}, 14 | {"u": 2, "v": 55, "defined": true}, 15 | {"u": 3, "v": 42, "defined": true}, 16 | {"u": 3.9, "v": 39, "defined": true}, 17 | {"u": 4, "v": 34, "defined": false}, 18 | {"u": 5, "v": 36, "defined": true}, 19 | {"u": 6, "v": 48, "defined": false}, 20 | {"u": 6.1, "v": 30, "defined": true}, 21 | {"u": 8, "v": 26, "defined": true}, 22 | {"u": 9, "v": 46, "defined": true} 23 | ] 24 | }, 25 | { 26 | "name": "data_0", 27 | "source": "source_0", 28 | "transform": [ 29 | {"type": "formula", "expr": "toNumber(datum[\"u\"])", "as": "u"} 30 | ] 31 | } 32 | ], 33 | "marks": [ 34 | { 35 | "name": "marks", 36 | "type": "area", 37 | "sort": {"field": "datum[\"u\"]"}, 38 | "from": {"data": "data_0"}, 39 | "encode": { 40 | "update": { 41 | "orient": {"value": "horizontal"}, 42 | "fill": {"value": "green"}, 43 | "fillOpacity": {"value": 0.5}, 44 | "strokeWidth": {"value": 4}, 45 | "stroke": {"value": "crimson"}, 46 | "strokeOpacity": {"value": 0.7}, 47 | "x": {"scale": "x", "field": "v"}, 48 | "y": {"scale": "y", "field": "u"}, 49 | "x2": {"value": 90}, 50 | "defined": {"field": "defined"} 51 | } 52 | } 53 | } 54 | ], 55 | "scales": [ 56 | { 57 | "name": "y", 58 | "type": "linear", 59 | "domain": [1, 10], 60 | "range": [0, {"signal": "width"}], 61 | "nice": true 62 | }, 63 | { 64 | "name": "x", 65 | "type": "linear", 66 | "domain": [20, 70], 67 | "range": [{"signal": "height"}, 0], 68 | "nice": true 69 | } 70 | ] 71 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/line/line_dashed_butt_undefined.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "values": [ 13 | {"u": 1, "v": 28, "defined": true}, 14 | {"u": 2, "v": 55, "defined": true}, 15 | {"u": 3, "v": 42, "defined": true}, 16 | {"u": 3.9, "v": 39, "defined": true}, 17 | {"u": 4, "v": 34, "defined": false}, 18 | {"u": 5, "v": 36, "defined": true}, 19 | {"u": 6, "v": 48, "defined": true}, 20 | {"u": 6.1, "v": 30, "defined": true}, 21 | {"u": 8, "v": 26, "defined": true}, 22 | {"u": 9, "v": 46, "defined": true} 23 | ] 24 | }, 25 | { 26 | "name": "data_0", 27 | "source": "source_0", 28 | "transform": [ 29 | {"type": "formula", "expr": "toNumber(datum[\"u\"])", "as": "u"} 30 | ] 31 | } 32 | ], 33 | "marks": [ 34 | { 35 | "name": "marks", 36 | "type": "line", 37 | "sort": {"field": "datum[\"u\"]"}, 38 | "from": {"data": "data_0"}, 39 | "encode": { 40 | "update": { 41 | "strokeCap": {"value": "butt"}, 42 | "strokeJoin": {"value": "miter"}, 43 | "strokeWidth": {"value": 4}, 44 | "strokeDash": {"value": [14, 8]}, 45 | "stroke": {"value": "#4c78a8"}, 46 | "x": {"scale": "x", "field": "u"}, 47 | "y": {"scale": "y", "field": "v"}, 48 | "defined": {"field": "defined"} 49 | } 50 | } 51 | } 52 | ], 53 | "scales": [ 54 | { 55 | "name": "x", 56 | "type": "linear", 57 | "domain": [1, 10], 58 | "range": [0, {"signal": "width"}], 59 | "nice": true 60 | }, 61 | { 62 | "name": "y", 63 | "type": "linear", 64 | "domain": [20, 70], 65 | "range": [{"signal": "height"}, 0], 66 | "nice": true 67 | } 68 | ] 69 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/line/line_dashed_round_undefined.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "values": [ 13 | {"u": 1, "v": 28, "defined": true}, 14 | {"u": 2, "v": 55, "defined": true}, 15 | {"u": 3, "v": 42, "defined": true}, 16 | {"u": 3.9, "v": 39, "defined": true}, 17 | {"u": 4, "v": 34, "defined": false}, 18 | {"u": 5, "v": 36, "defined": true}, 19 | {"u": 6, "v": 48, "defined": true}, 20 | {"u": 6.1, "v": 30, "defined": true}, 21 | {"u": 8, "v": 26, "defined": true}, 22 | {"u": 9, "v": 46, "defined": true} 23 | ] 24 | }, 25 | { 26 | "name": "data_0", 27 | "source": "source_0", 28 | "transform": [ 29 | {"type": "formula", "expr": "toNumber(datum[\"u\"])", "as": "u"} 30 | ] 31 | } 32 | ], 33 | "marks": [ 34 | { 35 | "name": "marks", 36 | "type": "line", 37 | "sort": {"field": "datum[\"u\"]"}, 38 | "from": {"data": "data_0"}, 39 | "encode": { 40 | "update": { 41 | "strokeCap": {"value": "round"}, 42 | "strokeJoin": {"value": "round"}, 43 | "strokeWidth": {"value": 4}, 44 | "strokeDash": {"value": [14, 8]}, 45 | "stroke": {"value": "#4c78a8"}, 46 | "x": {"scale": "x", "field": "u"}, 47 | "y": {"scale": "y", "field": "v"}, 48 | "defined": {"field": "defined"} 49 | } 50 | } 51 | } 52 | ], 53 | "scales": [ 54 | { 55 | "name": "x", 56 | "type": "linear", 57 | "domain": [1, 10], 58 | "range": [0, {"signal": "width"}], 59 | "nice": true 60 | }, 61 | { 62 | "name": "y", 63 | "type": "linear", 64 | "domain": [20, 70], 65 | "range": [{"signal": "height"}, 0], 66 | "nice": true 67 | } 68 | ] 69 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/line/line_dashed_square_undefined.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "values": [ 13 | {"u": 1, "v": 28, "defined": true}, 14 | {"u": 2, "v": 55, "defined": true}, 15 | {"u": 3, "v": 42, "defined": true}, 16 | {"u": 3.9, "v": 39, "defined": true}, 17 | {"u": 4, "v": 34, "defined": false}, 18 | {"u": 5, "v": 36, "defined": true}, 19 | {"u": 6, "v": 48, "defined": true}, 20 | {"u": 6.1, "v": 30, "defined": true}, 21 | {"u": 8, "v": 26, "defined": true}, 22 | {"u": 9, "v": 46, "defined": true} 23 | ] 24 | }, 25 | { 26 | "name": "data_0", 27 | "source": "source_0", 28 | "transform": [ 29 | {"type": "formula", "expr": "toNumber(datum[\"u\"])", "as": "u"} 30 | ] 31 | } 32 | ], 33 | "marks": [ 34 | { 35 | "name": "marks", 36 | "type": "line", 37 | "sort": {"field": "datum[\"u\"]"}, 38 | "from": {"data": "data_0"}, 39 | "encode": { 40 | "update": { 41 | "strokeCap": {"value": "square"}, 42 | "strokeJoin": {"value": "bevel"}, 43 | "strokeWidth": {"value": 4}, 44 | "strokeDash": {"value": [14, 8]}, 45 | "stroke": {"value": "#4c78a8"}, 46 | "x": {"scale": "x", "field": "u"}, 47 | "y": {"scale": "y", "field": "v"}, 48 | "defined": {"field": "defined"} 49 | } 50 | } 51 | } 52 | ], 53 | "scales": [ 54 | { 55 | "name": "x", 56 | "type": "linear", 57 | "domain": [1, 10], 58 | "range": [0, {"signal": "width"}], 59 | "nice": true 60 | }, 61 | { 62 | "name": "y", 63 | "type": "linear", 64 | "domain": [20, 70], 65 | "range": [{"signal": "height"}, 0], 66 | "nice": true 67 | } 68 | ] 69 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/line/simple_line_butt_cap_miter_join.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "values": [ 13 | {"u": 1, "v": 28, "defined": true}, 14 | {"u": 2, "v": 55, "defined": true}, 15 | {"u": 3, "v": 42, "defined": true}, 16 | {"u": 3.9, "v": 39, "defined": true}, 17 | {"u": 4, "v": 34, "defined": false}, 18 | {"u": 5, "v": 36, "defined": true}, 19 | {"u": 6, "v": 48, "defined": false}, 20 | {"u": 6.1, "v": 30, "defined": true}, 21 | {"u": 8, "v": 26, "defined": true}, 22 | {"u": 9, "v": 46, "defined": true} 23 | ] 24 | }, 25 | { 26 | "name": "data_0", 27 | "source": "source_0", 28 | "transform": [ 29 | {"type": "formula", "expr": "toNumber(datum[\"u\"])", "as": "u"} 30 | ] 31 | } 32 | ], 33 | "marks": [ 34 | { 35 | "name": "marks", 36 | "type": "line", 37 | "sort": {"field": "datum[\"u\"]"}, 38 | "from": {"data": "data_0"}, 39 | "encode": { 40 | "update": { 41 | "strokeCap": {"value": "butt"}, 42 | "strokeJoin": {"value": "miter"}, 43 | "strokeWidth": {"value": 4}, 44 | "stroke": {"value": "crimson"}, 45 | "strokeOpacity": {"value": 0.7}, 46 | "x": {"scale": "x", "field": "u"}, 47 | "y": {"scale": "y", "field": "v"}, 48 | "defined": {"field": "defined"} 49 | } 50 | } 51 | } 52 | ], 53 | "scales": [ 54 | { 55 | "name": "x", 56 | "type": "linear", 57 | "domain": [1, 10], 58 | "range": [0, {"signal": "width"}], 59 | "nice": true 60 | }, 61 | { 62 | "name": "y", 63 | "type": "linear", 64 | "domain": [20, 70], 65 | "range": [{"signal": "height"}, 0], 66 | "nice": true 67 | } 68 | ] 69 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/line/simple_line_round_cap.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "values": [ 13 | {"u": 1, "v": 28, "defined": true}, 14 | {"u": 2, "v": 55, "defined": true}, 15 | {"u": 3, "v": 42, "defined": true}, 16 | {"u": 3.9, "v": 39, "defined": true}, 17 | {"u": 4, "v": 34, "defined": false}, 18 | {"u": 5, "v": 36, "defined": true}, 19 | {"u": 6, "v": 48, "defined": false}, 20 | {"u": 6.1, "v": 30, "defined": true}, 21 | {"u": 8, "v": 26, "defined": true}, 22 | {"u": 9, "v": 46, "defined": true} 23 | ] 24 | }, 25 | { 26 | "name": "data_0", 27 | "source": "source_0", 28 | "transform": [ 29 | {"type": "formula", "expr": "toNumber(datum[\"u\"])", "as": "u"} 30 | ] 31 | } 32 | ], 33 | "marks": [ 34 | { 35 | "name": "marks", 36 | "type": "line", 37 | "sort": {"field": "datum[\"u\"]"}, 38 | "from": {"data": "data_0"}, 39 | "encode": { 40 | "update": { 41 | "strokeCap": {"value": "round"}, 42 | "strokeJoin": {"value": "round"}, 43 | "strokeWidth": {"value": 4}, 44 | "stroke": {"value": "#4c78a8"}, 45 | "x": {"scale": "x", "field": "u"}, 46 | "y": {"scale": "y", "field": "v"}, 47 | "defined": {"field": "defined"} 48 | } 49 | } 50 | } 51 | ], 52 | "scales": [ 53 | { 54 | "name": "x", 55 | "type": "linear", 56 | "domain": [1, 10], 57 | "range": [0, {"signal": "width"}], 58 | "nice": true 59 | }, 60 | { 61 | "name": "y", 62 | "type": "linear", 63 | "domain": [20, 70], 64 | "range": [{"signal": "height"}, 0], 65 | "nice": true 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/line/simple_line_square_cap_bevel_join.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 300, 6 | "height": 200, 7 | "style": "cell", 8 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 9 | "data": [ 10 | { 11 | "name": "source_0", 12 | "values": [ 13 | {"u": 1, "v": 28, "defined": true}, 14 | {"u": 2, "v": 55, "defined": true}, 15 | {"u": 3, "v": 42, "defined": true}, 16 | {"u": 3.9, "v": 39, "defined": true}, 17 | {"u": 4, "v": 34, "defined": false}, 18 | {"u": 5, "v": 36, "defined": true}, 19 | {"u": 6, "v": 48, "defined": false}, 20 | {"u": 6.1, "v": 30, "defined": true}, 21 | {"u": 8, "v": 26, "defined": true}, 22 | {"u": 9, "v": 46, "defined": true} 23 | ] 24 | }, 25 | { 26 | "name": "data_0", 27 | "source": "source_0", 28 | "transform": [ 29 | {"type": "formula", "expr": "toNumber(datum[\"u\"])", "as": "u"} 30 | ] 31 | } 32 | ], 33 | "marks": [ 34 | { 35 | "name": "marks", 36 | "type": "line", 37 | "sort": {"field": "datum[\"u\"]"}, 38 | "from": {"data": "data_0"}, 39 | "encode": { 40 | "update": { 41 | "strokeCap": {"value": "square"}, 42 | "strokeJoin": {"value": "bevel"}, 43 | "strokeWidth": {"value": 4}, 44 | "stroke": {"value": "purple"}, 45 | "strokeOpacity": {"value": 0.5}, 46 | "x": {"scale": "x", "field": "u"}, 47 | "y": {"scale": "y", "field": "v"}, 48 | "defined": {"field": "defined"} 49 | } 50 | } 51 | } 52 | ], 53 | "scales": [ 54 | { 55 | "name": "x", 56 | "type": "linear", 57 | "domain": [1, 10], 58 | "range": [0, {"signal": "width"}], 59 | "nice": true 60 | }, 61 | { 62 | "name": "y", 63 | "type": "linear", 64 | "domain": [20, 70], 65 | "range": [{"signal": "height"}, 0], 66 | "nice": true 67 | } 68 | ] 69 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/path/multi_path_no_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 300, 7 | "height": 300, 8 | "style": "view", 9 | "data": [{ 10 | "name": "data_0", 11 | "values": [ 12 | {"x": 20, "y": 30, "fill": "green", "scaleX": 15, "scaleY": 15, "angle": 0, "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z"}, 13 | {"x": 40, "y": 30, "fill": "blue", "scaleX": 15, "scaleY": 30, "angle": 10, "path": "M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z"}, 14 | {"x": 150, "y": 170, "fill": "darkorange", "scaleX": 30, "scaleY": 15, "angle": -15, "path": "M-1,-1L1,-1L1,1L-1,1Z"} 15 | ] 16 | }], 17 | "marks": [ 18 | { 19 | "name": "marks", 20 | "type": "path", 21 | "from": {"data": "data_0"}, 22 | "style": ["arc"], 23 | "encode": { 24 | "update": { 25 | "x": {"field": "x"}, 26 | "y": {"field": "y"}, 27 | "scaleX": {"field": "scaleX"}, 28 | "scaleY": {"field": "scaleY"}, 29 | "path": {"field": "path"}, 30 | "fill": {"field": "fill"}, 31 | "fillOpacity": {"value": 0.6}, 32 | "angle": {"field": "angle"} 33 | } 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/path/multi_path_with_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 300, 7 | "height": 300, 8 | "style": "view", 9 | "data": [{ 10 | "name": "data_0", 11 | "values": [ 12 | {"x": 20, "y": 30, "fill": "green", "scaleX": 15, "scaleY": 15, "angle": 0, "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z"}, 13 | {"x": 40, "y": 30, "fill": "blue", "scaleX": 15, "scaleY": 30, "angle": 10, "path": "M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z"}, 14 | {"x": 150, "y": 170, "fill": "darkorange", "scaleX": 30, "scaleY": 15, "angle": -15, "path": "M-1,-1L1,-1L1,1L-1,1Z"} 15 | ] 16 | }], 17 | "marks": [ 18 | { 19 | "name": "marks", 20 | "type": "path", 21 | "from": {"data": "data_0"}, 22 | "style": ["arc"], 23 | "encode": { 24 | "update": { 25 | "x": {"field": "x"}, 26 | "y": {"field": "y"}, 27 | "scaleX": {"field": "scaleX"}, 28 | "scaleY": {"field": "scaleY"}, 29 | "path": {"field": "path"}, 30 | "fill": {"field": "fill"}, 31 | "fillOpacity": {"value": 0.6}, 32 | "angle": {"field": "angle"}, 33 | "stroke": {"value": "deeppink"}, 34 | "strokeWidth": {"value": 3} 35 | } 36 | } 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/path/multi_path_with_stroke_no_fill.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 300, 7 | "height": 300, 8 | "style": "view", 9 | "data": [{ 10 | "name": "data_0", 11 | "values": [ 12 | {"x": 20, "y": 30, "fill": "green", "scaleX": 15, "scaleY": 15, "angle": 0, "path": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z"}, 13 | {"x": 40, "y": 30, "fill": "blue", "scaleX": 15, "scaleY": 30, "angle": 10, "path": "M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z"}, 14 | {"x": 150, "y": 170, "fill": "darkorange", "scaleX": 30, "scaleY": 15, "angle": -15, "path": "M-1,-1L1,-1L1,1L-1,1Z"} 15 | ] 16 | }], 17 | "marks": [ 18 | { 19 | "name": "marks", 20 | "type": "path", 21 | "from": {"data": "data_0"}, 22 | "style": ["arc"], 23 | "encode": { 24 | "update": { 25 | "x": {"field": "x"}, 26 | "y": {"field": "y"}, 27 | "scaleX": {"field": "scaleX"}, 28 | "scaleY": {"field": "scaleY"}, 29 | "path": {"field": "path"}, 30 | "angle": {"field": "angle"}, 31 | "stroke": {"value": "deeppink"}, 32 | "strokeWidth": {"value": 3} 33 | } 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/path/single_path_no_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 200, 7 | "height": 200, 8 | "style": "view", 9 | "data": [{ 10 | "name": "data_0", 11 | "values": [ 12 | {"x": 50, "y": 70, "fill": "green", "scaleX": 15, "scaleY": 15, "angle": 0}, 13 | {"x": 90, "y": 90, "fill": "blue", "scaleX": 15, "scaleY": 30, "angle": 15}, 14 | {"x": 130, "y": 130, "fill": "darkorange", "scaleX": 30, "scaleY": 15, "angle": -20} 15 | ] 16 | }], 17 | "marks": [ 18 | { 19 | "name": "marks", 20 | "type": "path", 21 | "from": {"data": "data_0"}, 22 | "style": ["arc"], 23 | "encode": { 24 | "update": { 25 | "x": {"field": "x"}, 26 | "y": {"field": "y"}, 27 | "scaleX": {"field": "scaleX"}, 28 | "scaleY": {"field": "scaleY"}, 29 | "path": {"value": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z"}, 30 | "fill": {"field": "fill"}, 31 | "fillOpacity": {"value": 0.6}, 32 | "angle": {"field": "angle"} 33 | } 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/path/single_path_with_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 200, 7 | "height": 200, 8 | "style": "view", 9 | "data": [{ 10 | "name": "data_0", 11 | "values": [ 12 | {"x": 50, "y": 70, "fill": "green", "scaleX": 15, "scaleY": 15, "angle": 0}, 13 | {"x": 90, "y": 90, "fill": "blue", "scaleX": 15, "scaleY": 30, "angle": 15}, 14 | {"x": 130, "y": 130, "fill": "darkorange", "scaleX": 30, "scaleY": 15, "angle": -20} 15 | ] 16 | }], 17 | "marks": [ 18 | { 19 | "name": "marks", 20 | "type": "path", 21 | "from": {"data": "data_0"}, 22 | "style": ["arc"], 23 | "encode": { 24 | "update": { 25 | "x": {"field": "x"}, 26 | "y": {"field": "y"}, 27 | "scaleX": {"field": "scaleX"}, 28 | "scaleY": {"field": "scaleY"}, 29 | "path": {"value": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z"}, 30 | "fill": {"field": "fill"}, 31 | "fillOpacity": {"value": 0.6}, 32 | "angle": {"field": "angle"}, 33 | "stroke": {"value": "deeppink"}, 34 | "strokeWidth": {"value": 3} 35 | } 36 | } 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/path/single_path_with_stroke_no_fill.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A simple pie chart with embedded data.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 200, 7 | "height": 200, 8 | "style": "view", 9 | "data": [{ 10 | "name": "data_0", 11 | "values": [ 12 | {"x": 50, "y": 70, "fill": "green", "scaleX": 15, "scaleY": 15, "angle": 0}, 13 | {"x": 90, "y": 90, "fill": "blue", "scaleX": 15, "scaleY": 30, "angle": 15}, 14 | {"x": 130, "y": 130, "fill": "darkorange", "scaleX": 30, "scaleY": 15, "angle": -20} 15 | ] 16 | }], 17 | "marks": [ 18 | { 19 | "name": "marks", 20 | "type": "path", 21 | "from": {"data": "data_0"}, 22 | "style": ["arc"], 23 | "encode": { 24 | "update": { 25 | "x": {"field": "x"}, 26 | "y": {"field": "y"}, 27 | "scaleX": {"field": "scaleX"}, 28 | "scaleY": {"field": "scaleY"}, 29 | "path": {"value": "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6.8L0,.5Z"}, 30 | "angle": {"field": "angle"}, 31 | "stroke": {"value": "deeppink"}, 32 | "strokeWidth": {"value": 3} 33 | } 34 | } 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/rect/stacked_bar.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A basic stacked bar chart example.", 4 | "width": 500, 5 | "height": 200, 6 | "padding": 5, 7 | "background": "white", 8 | "data": [ 9 | { 10 | "name": "table", 11 | "values": [ 12 | {"x": 0, "y": 28, "c": 0}, {"x": 0, "y": 55, "c": 1}, 13 | {"x": 1, "y": 43, "c": 0}, {"x": 1, "y": 91, "c": 1}, 14 | {"x": 2, "y": 81, "c": 0}, {"x": 2, "y": 53, "c": 1}, 15 | {"x": 3, "y": 19, "c": 0}, {"x": 3, "y": 87, "c": 1}, 16 | {"x": 4, "y": 52, "c": 0}, {"x": 4, "y": 48, "c": 1}, 17 | {"x": 5, "y": 24, "c": 0}, {"x": 5, "y": 49, "c": 1}, 18 | {"x": 6, "y": 87, "c": 0}, {"x": 6, "y": 66, "c": 1}, 19 | {"x": 7, "y": 17, "c": 0}, {"x": 7, "y": 27, "c": 1}, 20 | {"x": 8, "y": 68, "c": 0}, {"x": 8, "y": 16, "c": 1}, 21 | {"x": 9, "y": 49, "c": 0}, {"x": 9, "y": 15, "c": 1} 22 | ], 23 | "transform": [ 24 | { 25 | "type": "stack", 26 | "groupby": ["x"], 27 | "sort": {"field": "c"}, 28 | "field": "y" 29 | } 30 | ] 31 | } 32 | ], 33 | 34 | "scales": [ 35 | { 36 | "name": "x", 37 | "type": "band", 38 | "range": "width", 39 | "domain": {"data": "table", "field": "x"} 40 | }, 41 | { 42 | "name": "y", 43 | "type": "linear", 44 | "range": "height", 45 | "nice": true, "zero": true, 46 | "domain": {"data": "table", "field": "y1"} 47 | }, 48 | { 49 | "name": "color", 50 | "type": "ordinal", 51 | "range": "category", 52 | "domain": {"data": "table", "field": "c"} 53 | } 54 | ], 55 | 56 | "marks": [ 57 | { 58 | "type": "rect", 59 | "from": {"data": "table"}, 60 | "encode": { 61 | "enter": { 62 | "x": {"scale": "x", "field": "x"}, 63 | "width": {"scale": "x", "band": 1, "offset": -1}, 64 | "y": {"scale": "y", "field": "y0"}, 65 | "y2": {"scale": "y", "field": "y1"}, 66 | "fill": {"scale": "color", "field": "c"} 67 | }, 68 | "update": { 69 | "fillOpacity": {"value": 1} 70 | } 71 | } 72 | } 73 | ] 74 | } 75 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/rect/stacked_bar_rounded.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A basic stacked bar chart example.", 4 | "width": 500, 5 | "height": 200, 6 | "padding": 5, 7 | "background": "white", 8 | "data": [ 9 | { 10 | "name": "table", 11 | "values": [ 12 | {"x": 0, "y": 28, "c": 0}, {"x": 0, "y": 55, "c": 1}, 13 | {"x": 1, "y": 43, "c": 0}, {"x": 1, "y": 91, "c": 1}, 14 | {"x": 2, "y": 81, "c": 0}, {"x": 2, "y": 53, "c": 1}, 15 | {"x": 3, "y": 19, "c": 0}, {"x": 3, "y": 87, "c": 1}, 16 | {"x": 4, "y": 52, "c": 0}, {"x": 4, "y": 48, "c": 1}, 17 | {"x": 5, "y": 24, "c": 0}, {"x": 5, "y": 49, "c": 1}, 18 | {"x": 6, "y": 87, "c": 0}, {"x": 6, "y": 66, "c": 1}, 19 | {"x": 7, "y": 17, "c": 0}, {"x": 7, "y": 27, "c": 1}, 20 | {"x": 8, "y": 68, "c": 0}, {"x": 8, "y": 16, "c": 1}, 21 | {"x": 9, "y": 49, "c": 0}, {"x": 9, "y": 15, "c": 1} 22 | ], 23 | "transform": [ 24 | { 25 | "type": "stack", 26 | "groupby": ["x"], 27 | "sort": {"field": "c"}, 28 | "field": "y" 29 | } 30 | ] 31 | } 32 | ], 33 | 34 | "scales": [ 35 | { 36 | "name": "x", 37 | "type": "band", 38 | "range": "width", 39 | "domain": {"data": "table", "field": "x"} 40 | }, 41 | { 42 | "name": "y", 43 | "type": "linear", 44 | "range": "height", 45 | "nice": true, "zero": true, 46 | "domain": {"data": "table", "field": "y1"} 47 | }, 48 | { 49 | "name": "color", 50 | "type": "ordinal", 51 | "range": "category", 52 | "domain": {"data": "table", "field": "c"} 53 | }, 54 | { 55 | "name": "radius", 56 | "type": "ordinal", 57 | "range": [6, 12], 58 | "domain": {"data": "table", "field": "c"} 59 | } 60 | ], 61 | 62 | "marks": [ 63 | { 64 | "type": "rect", 65 | "from": {"data": "table"}, 66 | "encode": { 67 | "enter": { 68 | "x": {"scale": "x", "field": "x"}, 69 | "width": {"scale": "x", "band": 1, "offset": -10}, 70 | "y": {"scale": "y", "field": "y0"}, 71 | "y2": {"scale": "y", "field": "y1"}, 72 | "fill": {"scale": "color", "field": "c"}, 73 | "cornerRadius": {"scale": "radius", "field": "c"} 74 | }, 75 | "update": { 76 | "fillOpacity": {"value": 1} 77 | } 78 | } 79 | } 80 | ] 81 | } 82 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/rect/stacked_bar_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A basic stacked bar chart example.", 4 | "width": 500, 5 | "height": 200, 6 | "padding": 5, 7 | "background": "white", 8 | "data": [ 9 | { 10 | "name": "table", 11 | "values": [ 12 | {"x": 0, "y": 28, "c": 0}, {"x": 0, "y": 55, "c": 1}, 13 | {"x": 1, "y": 43, "c": 0}, {"x": 1, "y": 91, "c": 1}, 14 | {"x": 2, "y": 81, "c": 0}, {"x": 2, "y": 53, "c": 1}, 15 | {"x": 3, "y": 19, "c": 0}, {"x": 3, "y": 87, "c": 1}, 16 | {"x": 4, "y": 52, "c": 0}, {"x": 4, "y": 48, "c": 1}, 17 | {"x": 5, "y": 24, "c": 0}, {"x": 5, "y": 49, "c": 1}, 18 | {"x": 6, "y": 87, "c": 0}, {"x": 6, "y": 66, "c": 1}, 19 | {"x": 7, "y": 17, "c": 0}, {"x": 7, "y": 27, "c": 1}, 20 | {"x": 8, "y": 68, "c": 0}, {"x": 8, "y": 16, "c": 1}, 21 | {"x": 9, "y": 49, "c": 0}, {"x": 9, "y": 15, "c": 1} 22 | ], 23 | "transform": [ 24 | { 25 | "type": "stack", 26 | "groupby": ["x"], 27 | "sort": {"field": "c"}, 28 | "field": "y" 29 | } 30 | ] 31 | } 32 | ], 33 | 34 | "scales": [ 35 | { 36 | "name": "x", 37 | "type": "band", 38 | "range": "width", 39 | "domain": {"data": "table", "field": "x"} 40 | }, 41 | { 42 | "name": "y", 43 | "type": "linear", 44 | "range": "height", 45 | "nice": true, "zero": true, 46 | "domain": {"data": "table", "field": "y1"} 47 | }, 48 | { 49 | "name": "color", 50 | "type": "ordinal", 51 | "range": "category", 52 | "domain": {"data": "table", "field": "c"} 53 | }, 54 | { 55 | "name": "stroke-color", 56 | "type": "ordinal", 57 | "range": ["pink", "purple"], 58 | "domain": {"data": "table", "field": "c"} 59 | } 60 | ], 61 | 62 | "marks": [ 63 | { 64 | "type": "rect", 65 | "from": {"data": "table"}, 66 | "encode": { 67 | "enter": { 68 | "x": {"scale": "x", "field": "x"}, 69 | "width": {"scale": "x", "band": 1, "offset": -10}, 70 | "y": {"scale": "y", "field": "y0"}, 71 | "y2": {"scale": "y", "field": "y1"}, 72 | "fill": {"scale": "color", "field": "c"}, 73 | "stroke": {"scale": "stroke-color", "field": "c"}, 74 | "strokeWidth": {"value": 4} 75 | }, 76 | "update": { 77 | "fillOpacity": {"value": 1} 78 | } 79 | } 80 | } 81 | ] 82 | } 83 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/rule/dashed_rules.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A scatterplot showing horsepower and miles per gallons for various cars.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 400, 7 | "height": 400, 8 | "style": "cell", 9 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 10 | "data": [{ 11 | "name": "source_0", 12 | "values": [ 13 | {"x": 340, "x2": 60, "y": 15, "y2": 380, "fill": "orange", "cap": "butt", "width": 8, "dash": "12 8,4"}, 14 | {"x": 20, "x2": 320, "y": 15, "y2": 340, "fill": "blue", "cap": "square", "width": 4, "dash": "8,16"}, 15 | {"x": 80, "x2": 220, "y": 15, "y2": 380, "fill": "green", "cap": "round", "width": 6, "dash": "12"} 16 | ] 17 | }], 18 | "marks": [ 19 | { 20 | "name": "marks", 21 | "type": "rule", 22 | "style": ["rule"], 23 | "from": {"data": "source_0"}, 24 | "encode": { 25 | "update": { 26 | "strokeWidth": {"field": "width"}, 27 | "stroke": {"field": "fill"}, 28 | "x": {"field": "x" }, 29 | "x2": {"field": "x2"}, 30 | "y": {"field": "y"}, 31 | "y2": {"field": "y2"}, 32 | "opacity": {"value": 0.7}, 33 | "strokeCap": {"field": "cap"}, 34 | "strokeDash": {"field": "dash"} 35 | } 36 | } 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/rule/wide_rule_axes.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A scatterplot showing horsepower and miles per gallons for various cars.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 300, 7 | "height": 200, 8 | "style": "cell", 9 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 10 | "data": [{"name": "source_0", "values": [{}]}], 11 | "marks": [ 12 | { 13 | "name": "marks", 14 | "type": "rule", 15 | "style": ["rule"], 16 | "from": {"data": "source_0"}, 17 | "encode": { 18 | "update": { 19 | "strokeWidth": {"value": 16}, 20 | "stroke": {"value": "orange"}, 21 | "x": {"scale": "x", "signal": "30"}, 22 | "x2": {"scale": "x", "signal": "60"}, 23 | "y": {"scale": "y", "signal": "15"}, 24 | "y2": {"scale": "y", "signal": "80"} 25 | } 26 | } 27 | } 28 | ], 29 | "scales": [ 30 | { 31 | "name": "x", 32 | "type": "linear", 33 | "domain": [0, 100], 34 | "range": [0, {"signal": "width"}], 35 | "zero": true 36 | }, 37 | { 38 | "name": "y", 39 | "type": "linear", 40 | "domain": [0, 100], 41 | "range": [{"signal": "height"}, 0], 42 | "zero": true 43 | } 44 | ], 45 | "axes": [ 46 | { 47 | "scale": "x", 48 | "orient": "bottom", 49 | "grid": false, 50 | "labelFlush": true, 51 | "labels": false, 52 | "labelOverlap": true, 53 | "tickCount": {"signal": "ceil(width/40)"}, 54 | "zindex": 0 55 | }, 56 | { 57 | "scale": "y", 58 | "orient": "left", 59 | "grid": false, 60 | "labelOverlap": true, 61 | "labels": false, 62 | "tickCount": {"signal": "ceil(height/40)"}, 63 | "zindex": 0 64 | } 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/rule/wide_transparent_caps.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A scatterplot showing horsepower and miles per gallons for various cars.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 200, 7 | "height": 200, 8 | "style": "cell", 9 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 10 | "data": [{ 11 | "name": "source_0", 12 | "values": [ 13 | {"x": 140, "x2": 60, "y": 15, "y2": 180, "fill": "orange", "cap": "butt", "width": 12}, 14 | {"x": 20, "x2": 120, "y": 15, "y2": 140, "fill": "blue", "cap": "square", "width": 16}, 15 | {"x": 50, "x2": 120, "y": 15, "y2": 180, "fill": "green", "cap": "round", "width": 20} 16 | ] 17 | }], 18 | "marks": [ 19 | { 20 | "name": "marks", 21 | "type": "rule", 22 | "style": ["rule"], 23 | "from": {"data": "source_0"}, 24 | "encode": { 25 | "update": { 26 | "strokeWidth": {"field": "width"}, 27 | "stroke": {"field": "fill"}, 28 | "x": {"field": "x" }, 29 | "x2": {"field": "x2"}, 30 | "y": {"field": "y"}, 31 | "y2": {"field": "y2"}, 32 | "opacity": {"value": 0.5}, 33 | "strokeCap": {"field": "cap"} 34 | } 35 | } 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/shape/us-counties.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 600, 6 | "height":400, 7 | "style": "view", 8 | "data": [ 9 | { 10 | "name": "source_1", 11 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/unemployment.tsv", 12 | "format": {"type": "tsv", "delimiter": "\t"} 13 | }, 14 | { 15 | "name": "source_0", 16 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/us-10m.json", 17 | "format": {"type": "topojson", "feature": "counties"}, 18 | "transform": [ 19 | { 20 | "type": "lookup", 21 | "from": "source_1", 22 | "key": "id", 23 | "fields": ["id"], 24 | "values": ["rate"] 25 | }, 26 | { 27 | "type": "filter", 28 | "expr": "isValid(datum[\"rate\"]) && isFinite(+datum[\"rate\"])" 29 | } 30 | ] 31 | } 32 | ], 33 | "projections": [ 34 | { 35 | "name": "projection", 36 | "size": {"signal": "[width, height]"}, 37 | "fit": {"signal": "data('source_0')"}, 38 | "type": "albersUsa" 39 | } 40 | ], 41 | "marks": [ 42 | { 43 | "name": "marks", 44 | "type": "shape", 45 | "style": ["geoshape"], 46 | "from": {"data": "source_0"}, 47 | "encode": { 48 | "update": { 49 | "fill": {"scale": "color", "field": "rate"}, 50 | "ariaRoleDescription": {"value": "geoshape"}, 51 | "description": { 52 | "signal": "\"rate: \" + (format(datum[\"rate\"], \"\"))" 53 | } 54 | } 55 | }, 56 | "transform": [{"type": "geoshape", "projection": "projection"}] 57 | } 58 | ], 59 | "scales": [ 60 | { 61 | "name": "color", 62 | "type": "linear", 63 | "domain": {"data": "source_0", "field": "rate"}, 64 | "range": "heatmap", 65 | "interpolate": "hcl", 66 | "zero": false 67 | } 68 | ] 69 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/shape/us-map.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 800, 6 | "height": 500, 7 | "style": "view", 8 | "data": [ 9 | { 10 | "name": "source_0", 11 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/us-10m.json", 12 | "format": {"type": "topojson", "feature": "states"} 13 | }, 14 | { 15 | "name": "source_1", 16 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/us-state-capitals.json", 17 | "format": {"type": "json"}, 18 | "transform": [ 19 | { 20 | "type": "geojson", 21 | "fields": ["lon", "lat"], 22 | "signal": "layer_1_layer_0_geojson_0" 23 | }, 24 | { 25 | "type": "geopoint", 26 | "projection": "projection", 27 | "fields": ["lon", "lat"], 28 | "as": ["layer_1_layer_0_x", "layer_1_layer_0_y"] 29 | } 30 | ] 31 | } 32 | ], 33 | "projections": [ 34 | { 35 | "name": "projection", 36 | "size": {"signal": "[width, height]"}, 37 | "fit": {"signal": "[data('source_0'), layer_1_layer_0_geojson_0]"}, 38 | "type": "albersUsa" 39 | } 40 | ], 41 | "marks": [ 42 | { 43 | "name": "layer_0_marks", 44 | "type": "shape", 45 | "style": ["geoshape"], 46 | "from": {"data": "source_0"}, 47 | "encode": { 48 | "update": { 49 | "fill": {"value": "lightgray"}, 50 | "stroke": {"value": "white"}, 51 | "ariaRoleDescription": {"value": "geoshape"} 52 | } 53 | }, 54 | "transform": [{"type": "geoshape", "projection": "projection"}] 55 | }, 56 | { 57 | "name": "layer_1_layer_0_marks", 58 | "type": "symbol", 59 | "style": ["circle"], 60 | "from": {"data": "source_1"}, 61 | "encode": { 62 | "update": { 63 | "opacity": {"value": 0.7}, 64 | "fill": {"value": "crimson"}, 65 | "ariaRoleDescription": {"value": "circle"}, 66 | "description": { 67 | "signal": "\"lon: \" + (format(datum[\"lon\"], \"\")) + \"; lat: \" + (format(datum[\"lat\"], \"\"))" 68 | }, 69 | "x": {"field": "layer_1_layer_0_x"}, 70 | "y": {"field": "layer_1_layer_0_y"}, 71 | "shape": {"value": "circle"} 72 | } 73 | } 74 | } 75 | ] 76 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/shape/world-natural-earth-projection.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 700, 6 | "height": 400, 7 | "style": "view", 8 | "data": [ 9 | { 10 | "name": "source_0", 11 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/world-110m.json", 12 | "format": {"type": "topojson", "feature": "countries"} 13 | } 14 | ], 15 | "projections": [ 16 | { 17 | "name": "projection", 18 | "size": {"signal": "[width, height]"}, 19 | "fit": {"signal": "data('source_0')"}, 20 | "type": "naturalEarth1" 21 | } 22 | ], 23 | "marks": [ 24 | { 25 | "name": "marks", 26 | "type": "shape", 27 | "style": ["geoshape"], 28 | "from": {"data": "source_0"}, 29 | "encode": { 30 | "update": { 31 | "fill": {"value": "lightgray"}, 32 | "stroke": {"value": "gray"}, 33 | "ariaRoleDescription": {"value": "geoshape"} 34 | } 35 | }, 36 | "transform": [{"type": "geoshape", "projection": "projection"}] 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/symbol/scatter_transparent_stroke.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A bubbleplot showing horsepower on x, miles per gallons on y, and binned acceleration on size.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 500, 7 | "height": 500, 8 | "style": "cell", 9 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 10 | "data": [ 11 | { 12 | "name": "source_0", 13 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/cars.json", 14 | "format": {"type": "json"}, 15 | "transform": [ 16 | { 17 | "type": "filter", 18 | "expr": "isValid(datum[\"Horsepower\"]) && isFinite(+datum[\"Horsepower\"]) && isValid(datum[\"Miles_per_Gallon\"]) && isFinite(+datum[\"Miles_per_Gallon\"]) && isValid(datum[\"Acceleration\"]) && isFinite(+datum[\"Acceleration\"])" 19 | } 20 | ] 21 | } 22 | ], 23 | "marks": [ 24 | { 25 | "name": "marks", 26 | "type": "symbol", 27 | "style": ["point"], 28 | "from": {"data": "source_0"}, 29 | "encode": { 30 | "update": { 31 | "opacity": {"value": 0.5}, 32 | "fill": {"value": "darkcyan"}, 33 | "stroke": {"value": "crimson"}, 34 | "ariaRoleDescription": {"value": "point"}, 35 | "description": { 36 | "signal": "\"Horsepower: \" + (format(datum[\"Horsepower\"], \"\")) + \"; Miles_per_Gallon: \" + (format(datum[\"Miles_per_Gallon\"], \"\")) + \"; Acceleration: \" + (format(datum[\"Acceleration\"], \"\"))" 37 | }, 38 | "x": {"scale": "x", "field": "Horsepower"}, 39 | "y": {"scale": "y", "field": "Miles_per_Gallon"}, 40 | "size": {"scale": "size", "field": "Acceleration"} 41 | } 42 | } 43 | } 44 | ], 45 | "scales": [ 46 | { 47 | "name": "x", 48 | "type": "linear", 49 | "domain": {"data": "source_0", "field": "Horsepower"}, 50 | "range": [0, {"signal": "width"}], 51 | "nice": true, 52 | "zero": true 53 | }, 54 | { 55 | "name": "y", 56 | "type": "linear", 57 | "domain": {"data": "source_0", "field": "Miles_per_Gallon"}, 58 | "range": [{"signal": "height"}, 0], 59 | "nice": true, 60 | "zero": true 61 | }, 62 | { 63 | "name": "size", 64 | "type": "linear", 65 | "domain": {"data": "source_0", "field": "Acceleration"}, 66 | "range": [0, 361], 67 | "zero": true 68 | } 69 | ] 70 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/symbol/wedge_angle.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 330, 3 | "height": 100, 4 | "background": "white", 5 | "data": [ 6 | { 7 | "name": "data_1", 8 | "values": [ 9 | {"x": 30, "angle": 0}, 10 | {"x": 60, "angle": 30}, 11 | {"x": 90, "angle": 90}, 12 | {"x": 120, "angle": 120}, 13 | {"x": 150, "angle": 180}, 14 | {"x": 180, "angle": 240}, 15 | {"x": 210, "angle": 270}, 16 | {"x": 240, "angle": 300}, 17 | {"x": 270, "angle": 330}, 18 | {"x": 300, "angle": 360} 19 | ] 20 | } 21 | ], 22 | "marks": [ 23 | { 24 | "type": "symbol", 25 | "from": {"data": "data_1"}, 26 | "encode": { 27 | "update": { 28 | "x": {"field": "x"}, 29 | "y": {"value": 40}, 30 | "shape": {"value": "wedge"}, 31 | "fill": {"value": "red"}, 32 | "size": {"value": 600}, 33 | "angle": {"field": "angle"} 34 | } 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/symbol/wedge_stroke_angle.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 500, 3 | "height": 100, 4 | "background": "white", 5 | "data": [ 6 | { 7 | "name": "data_1", 8 | "values": [ 9 | {"x": 30, "angle": 0, "size": 600}, 10 | {"x": 60, "angle": 30, "size": 1200}, 11 | {"x": 90, "angle": 90, "size": 1800}, 12 | {"x": 150, "angle": 120, "size": 2200}, 13 | {"x": 200, "angle": 180, "size": 2800}, 14 | {"x": 250, "angle": 240, "size": 3000}, 15 | {"x": 310, "angle": 270, "size": 1600}, 16 | {"x": 360, "angle": 300, "size": 2400}, 17 | {"x": 400, "angle": 330, "size": 3000}, 18 | {"x": 450, "angle": 360, "size": 3600} 19 | ] 20 | } 21 | ], 22 | "marks": [ 23 | { 24 | "type": "symbol", 25 | "from": {"data": "data_1"}, 26 | "encode": { 27 | "update": { 28 | "x": {"field": "x"}, 29 | "y": {"value": 40}, 30 | "shape": {"value": "wedge"}, 31 | "fill": {"value": "red"}, 32 | "stroke": {"value": "black"}, 33 | "strokeWidth": {"value": 3}, 34 | "size": {"field": "size"}, 35 | "angle": {"field": "angle"} 36 | } 37 | } 38 | } 39 | ] 40 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/symbol/wind_vector.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "Vector array map showing wind speed and direction.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 700, 7 | "height": 700, 8 | "style": "view", 9 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 10 | "data": [ 11 | { 12 | "name": "source_0", 13 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/windvectors.csv", 14 | "format": { 15 | "type": "csv", 16 | "parse": {"longitude": "number", "latitude": "number"}, 17 | "delimiter": "," 18 | }, 19 | "transform": [ 20 | { 21 | "type": "geojson", 22 | "fields": ["longitude", "latitude"], 23 | "signal": "geojson_0" 24 | }, 25 | { 26 | "type": "geopoint", 27 | "projection": "projection", 28 | "fields": ["longitude", "latitude"], 29 | "as": ["x", "y"] 30 | }, 31 | { 32 | "type": "filter", 33 | "expr": "isValid(datum[\"dir\"]) && isFinite(+datum[\"dir\"]) && isValid(datum[\"speed\"]) && isFinite(+datum[\"speed\"])" 34 | } 35 | ] 36 | } 37 | ], 38 | "projections": [ 39 | { 40 | "name": "projection", 41 | "size": {"signal": "[width, height]"}, 42 | "fit": {"signal": "geojson_0"}, 43 | "type": "equalEarth" 44 | } 45 | ], 46 | "marks": [ 47 | { 48 | "name": "marks", 49 | "type": "symbol", 50 | "style": ["point"], 51 | "from": {"data": "source_0"}, 52 | "encode": { 53 | "update": { 54 | "opacity": {"value": 0.7}, 55 | "shape": {"value": "wedge"}, 56 | "fill": {"scale": "color", "field": "dir"}, 57 | "x": {"field": "x"}, 58 | "y": {"field": "y"}, 59 | "size": {"scale": "size", "field": "speed"}, 60 | "angle": {"scale": "angle", "field": "dir"} 61 | } 62 | } 63 | } 64 | ], 65 | "scales": [ 66 | { 67 | "name": "color", 68 | "type": "linear", 69 | "domain": [0, 360], 70 | "range": {"scheme": "rainbow"}, 71 | "interpolate": "hcl", 72 | "zero": true 73 | }, 74 | { 75 | "name": "size", 76 | "type": "linear", 77 | "domain": {"data": "source_0", "field": "speed"}, 78 | "range": [0, 500], 79 | "zero": true 80 | }, 81 | { 82 | "name": "angle", 83 | "type": "linear", 84 | "domain": [0, 360], 85 | "range": [180, 540], 86 | "zero": true 87 | } 88 | ] 89 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/symbol/zindex_circles.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "width": 100, 3 | "height": 100, 4 | "background": "white", 5 | "data": [ 6 | { 7 | "name": "data_1", 8 | "values": [ 9 | {"x": 30, "z": 3, "angle": 0, "c": "red", "size": 600}, 10 | {"x": 30, "z": 1, "angle": 30, "c": "blue", "size": 1200}, 11 | {"x": 10, "z": 0, "angle": 90, "c": "green", "size": 1800}, 12 | {"x": 50, "z": 2, "angle": 120, "c": "aqua", "size": 2200}, 13 | {"x": 30, "z": 0, "angle": 180, "c": "pink", "size": 2800} 14 | ] 15 | } 16 | ], 17 | "marks": [ 18 | { 19 | "type": "symbol", 20 | "from": {"data": "data_1"}, 21 | "encode": { 22 | "update": { 23 | "x": {"field": "x"}, 24 | "y": {"value": 40}, 25 | "zindex": {"field": "z"}, 26 | "shape": {"value": "circle"}, 27 | "fill": {"field": "c"}, 28 | "stroke": {"value": "black"}, 29 | "strokeWidth": {"value": 3}, 30 | "size": {"field": "size"}, 31 | "angle": {"field": "angle"} 32 | } 33 | } 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/text/text_alignment.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A scatterplot showing horsepower and miles per gallons for various cars.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 200, 7 | "height": 200, 8 | "style": "cell", 9 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 10 | "data": [{ 11 | "name": "source_0", 12 | "values": [ 13 | {"x": 40, "y": 15, "fill": "orange", "baseline": "top"}, 14 | {"x": 20, "y": 70, "fill": "blue", "baseline": "middle"}, 15 | {"x": 70, "y": 130, "fill": "green", "baseline": "bottom"}, 16 | {"x": 120, "y": 160, "fill": "purple", "baseline": "alphabetic"} 17 | ] 18 | }], 19 | "marks": [ 20 | { 21 | "name": "points", 22 | "type": "symbol", 23 | "from": {"data": "source_0"}, 24 | "encode": { 25 | "update": { 26 | "shape": {"value": "triangle-up"}, 27 | "size": {"value": 30}, 28 | "fill": {"field": "fill"}, 29 | "x": {"field": "x" }, 30 | "y": {"field": "y"} 31 | } 32 | } 33 | }, 34 | { 35 | "name": "text", 36 | "type": "text", 37 | "from": {"data": "source_0"}, 38 | "encode": { 39 | "update": { 40 | "text": {"value": "hello"}, 41 | "font": {"value": "Helvetica"}, 42 | "fontSize": {"value": 20}, 43 | "fill": {"field": "fill"}, 44 | "x": {"field": "x" }, 45 | "y": {"field": "y"}, 46 | "baseline": {"field": "baseline"} 47 | } 48 | } 49 | } 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/text/text_rotation.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "description": "A scatterplot showing horsepower and miles per gallons for various cars.", 4 | "background": "white", 5 | "padding": 5, 6 | "width": 200, 7 | "height": 200, 8 | "style": "cell", 9 | "config": {"style": {"cell": {"stroke": "transparent"}}}, 10 | "data": [{ 11 | "name": "source_0", 12 | "values": [ 13 | {"x": 40, "y": 15, "fill": "orange", "angle": 0, "baseline": "top"}, 14 | {"x": 20, "y": 70, "fill": "blue", "angle": 30, "baseline": "middle"}, 15 | {"x": 80, "y": 160, "fill": "green", "angle": -90, "baseline": "bottom"}, 16 | {"x": 120, "y": 160, "fill": "purple", "angle": -27, "baseline": "alphabetic"} 17 | ] 18 | }], 19 | "marks": [ 20 | { 21 | "name": "points", 22 | "type": "symbol", 23 | "from": {"data": "source_0"}, 24 | "encode": { 25 | "update": { 26 | "shape": {"value": "triangle-up"}, 27 | "size": {"value": 30}, 28 | "fill": {"field": "fill"}, 29 | "x": {"field": "x" }, 30 | "y": {"field": "y"}, 31 | "angle": {"field": "angle"} 32 | } 33 | } 34 | }, 35 | { 36 | "name": "text", 37 | "type": "text", 38 | "from": {"data": "source_0"}, 39 | "encode": { 40 | "update": { 41 | "text": {"value": "hello"}, 42 | "font": {"value": "Helvetica"}, 43 | "fontSize": {"value": 20}, 44 | "fill": {"field": "fill"}, 45 | "x": {"field": "x" }, 46 | "y": {"field": "y"}, 47 | "angle": {"field": "angle"}, 48 | "baseline": {"field": "baseline"} 49 | } 50 | } 51 | } 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /avenger-vega-test-data/vega-specs/vl-convert/custom_projection.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v5.json", 3 | "background": "white", 4 | "padding": 5, 5 | "width": 500, 6 | "height": 300, 7 | "style": "view", 8 | "data": [ 9 | { 10 | "name": "source_0", 11 | "url": "https://raw.githubusercontent.com/vega/vega-datasets/main/data/airports.csv", 12 | "format": {"type": "csv"}, 13 | "transform": [ 14 | { 15 | "type": "geopoint", 16 | "projection": "projection", 17 | "fields": ["longitude", "latitude"], 18 | "as": ["layer_0_x", "layer_0_y"] 19 | } 20 | ] 21 | } 22 | ], 23 | "projections": [ 24 | { 25 | "name": "projection", 26 | "translate": [1200, 700], 27 | "type": "albersUsa", 28 | "scale": 3000 29 | } 30 | ], 31 | "marks": [ 32 | { 33 | "name": "layer_0_marks", 34 | "type": "symbol", 35 | "clip": true, 36 | "style": ["circle"], 37 | "from": {"data": "source_0"}, 38 | "encode": { 39 | "update": { 40 | "opacity": {"value": 0.7}, 41 | "fill": {"value": "steelblue"}, 42 | "ariaRoleDescription": {"value": "circle"}, 43 | "description": { 44 | "signal": "\"longitude: \" + (format(datum[\"longitude\"], \"\")) + \"; latitude: \" + (format(datum[\"latitude\"], \"\"))" 45 | }, 46 | "x": {"field": "layer_0_x"}, 47 | "y": {"field": "layer_0_y"}, 48 | "size": {"value": 10}, 49 | "shape": {"value": "circle"} 50 | } 51 | } 52 | } 53 | ] 54 | } -------------------------------------------------------------------------------- /avenger-vega/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "avenger-vega" 3 | version = "0.0.8" 4 | edition = "2021" 5 | description = "Utilities for importing Vega scenegraphs into Avenger" 6 | license = "BSD-3-Clause" 7 | 8 | [features] 9 | image-request = [ "reqwest",] 10 | svg = [ "resvg", "usvg", "tiny-skia",] 11 | 12 | [dependencies] 13 | cfg-if = "1" 14 | csscolorparser = "0.7.0" 15 | 16 | [dependencies.resvg] 17 | version = "0.44.0" 18 | optional = true 19 | 20 | [dependencies.usvg] 21 | version = "0.44.0" 22 | optional = true 23 | 24 | [dependencies.tiny-skia] 25 | version = "0.11.3" 26 | optional = true 27 | 28 | [dependencies.lazy_static] 29 | workspace = true 30 | 31 | [dependencies.tracing] 32 | workspace = true 33 | 34 | [dependencies.avenger-scenegraph] 35 | path = "../avenger-scenegraph" 36 | version = "0.0.8" 37 | 38 | [dependencies.thiserror] 39 | workspace = true 40 | 41 | [dependencies.serde] 42 | workspace = true 43 | 44 | [dependencies.serde_json] 45 | version = "1.0.111" 46 | 47 | [dependencies.lyon_extra] 48 | workspace = true 49 | 50 | [dependencies.lyon_path] 51 | workspace = true 52 | features = [ "serialization",] 53 | 54 | [dependencies.image] 55 | workspace = true 56 | default-features = false 57 | features = [ "png",] 58 | 59 | [dependencies.reqwest] 60 | version = "0.12.9" 61 | features = [ "blocking", "rustls-tls",] 62 | optional = true 63 | 64 | [dependencies.pyo3] 65 | workspace = true 66 | optional = true 67 | -------------------------------------------------------------------------------- /avenger-vega/README.md: -------------------------------------------------------------------------------- 1 | ## avenger-vega 2 | 3 | This crate contains the logic for parsing vega scenegraphs and building avenger scenegraphs -------------------------------------------------------------------------------- /avenger-vega/src/error.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | #[cfg(feature = "pyo3")] 4 | use pyo3::{exceptions::PyValueError, PyErr}; 5 | 6 | #[derive(Error, Debug)] 7 | pub enum AvengerVegaError { 8 | #[error("Avenger error")] 9 | AvengerError(#[from] avenger_scenegraph::error::AvengerError), 10 | 11 | #[error("css color parse error")] 12 | InvalidColor(#[from] csscolorparser::ParseColorError), 13 | 14 | #[error("image error")] 15 | ImageError(#[from] image::ImageError), 16 | 17 | // ParseError doesn't implement std::Error, so #[from] doesn't seem to work 18 | #[error("Error parsing SVG path")] 19 | InvalidSvgPath(lyon_extra::parser::ParseError), 20 | 21 | #[error("Invalid dash string: {0}")] 22 | InvalidDashString(String), 23 | 24 | #[error("Image fetching is not enabled: {0}")] 25 | NoImageFetcherConfigured(String), 26 | 27 | #[error("SVG image support is not enabled: {0}")] 28 | SvgSupportDisabled(String), 29 | 30 | #[cfg(feature = "image-request")] 31 | #[error("css color parse error")] 32 | ReqwestError(#[from] reqwest::Error), 33 | 34 | #[cfg(feature = "svg")] 35 | #[error("usvg error: {0}")] 36 | UsvgError(#[from] usvg::Error), 37 | 38 | #[cfg(feature = "svg")] 39 | #[error("roxml Error: {0}")] 40 | RoxmlError(#[from] usvg::roxmltree::Error), 41 | } 42 | 43 | impl From for AvengerVegaError { 44 | fn from(value: lyon_extra::parser::ParseError) -> Self { 45 | Self::InvalidSvgPath(value) 46 | } 47 | } 48 | 49 | #[cfg(feature = "pyo3")] 50 | impl From for PyErr { 51 | fn from(err: AvengerVegaError) -> PyErr { 52 | PyValueError::new_err(err.to_string()) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /avenger-vega/src/image/mod.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "image-request")] 2 | pub mod reqwest_fetcher; 3 | 4 | #[cfg(feature = "svg")] 5 | pub mod svg; 6 | 7 | #[cfg(feature = "image-request")] 8 | use crate::image::reqwest_fetcher::ReqwestImageFetcher; 9 | 10 | use crate::error::AvengerVegaError; 11 | use image::DynamicImage; 12 | 13 | pub trait ImageFetcher { 14 | fn fetch_image(&self, url: &str) -> Result; 15 | } 16 | 17 | pub fn make_image_fetcher() -> Result, AvengerVegaError> { 18 | cfg_if::cfg_if! { 19 | if #[cfg(feature = "image-request")] { 20 | Ok(Box::new(ReqwestImageFetcher::new())) 21 | } else { 22 | Err(AvengerVegaError::NoImageFetcherConfigured( 23 | "Image fetching requires the image-reqwest feature flag".to_string() 24 | )) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /avenger-vega/src/image/reqwest_fetcher.rs: -------------------------------------------------------------------------------- 1 | use crate::error::AvengerVegaError; 2 | use crate::image::ImageFetcher; 3 | use image::DynamicImage; 4 | use reqwest::blocking::{Client, ClientBuilder}; 5 | 6 | #[cfg(feature = "svg")] 7 | use crate::image::svg::svg_to_png; 8 | 9 | pub struct ReqwestImageFetcher { 10 | client: Client, 11 | } 12 | 13 | static USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")); 14 | 15 | impl Default for ReqwestImageFetcher { 16 | fn default() -> Self { 17 | Self::new() 18 | } 19 | } 20 | 21 | impl ReqwestImageFetcher { 22 | pub fn new() -> Self { 23 | Self { 24 | client: ClientBuilder::new() 25 | .user_agent(USER_AGENT) 26 | .build() 27 | .expect("Failed to construct reqwest client"), 28 | } 29 | } 30 | } 31 | 32 | impl ImageFetcher for ReqwestImageFetcher { 33 | fn fetch_image(&self, url: &str) -> Result { 34 | let img_data = if url.ends_with(".svg") { 35 | cfg_if::cfg_if! { 36 | if #[cfg(feature = "svg")] { 37 | let svg_str = self.client.get(url).send()?.text()?; 38 | svg_to_png(&svg_str, 2.0)? 39 | } else { 40 | return Err(AvengerVegaError::SvgSupportDisabled( 41 | "Fetching SVG images requires the svg feature flag".to_string() 42 | )) 43 | } 44 | } 45 | } else { 46 | self.client.get(url).send()?.bytes()?.to_vec() 47 | }; 48 | let diffuse_image = image::load_from_memory(img_data.as_slice())?; 49 | Ok(diffuse_image) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /avenger-vega/src/image/svg.rs: -------------------------------------------------------------------------------- 1 | use resvg::render; 2 | use std::panic; 3 | use std::sync::{Arc, Mutex}; 4 | use usvg::fontdb::Database; 5 | 6 | use crate::error::AvengerVegaError; 7 | lazy_static! { 8 | pub static ref FONT_DB: Mutex = Mutex::new(init_font_db()); 9 | } 10 | 11 | fn init_font_db() -> usvg::fontdb::Database { 12 | let mut font_database = Database::new(); 13 | font_database.load_system_fonts(); 14 | font_database 15 | } 16 | 17 | pub fn svg_to_png(svg: &str, scale: f32) -> Result, AvengerVegaError> { 18 | // default ppi to 72 19 | let font_database = FONT_DB.lock().expect("Failed to acquire fontdb lock"); 20 | 21 | // catch_unwind so that we don't poison Mutexes 22 | // if usvg/resvg panics 23 | let response = panic::catch_unwind(|| { 24 | let xml_opt = usvg::roxmltree::ParsingOptions { 25 | allow_dtd: true, 26 | ..Default::default() 27 | }; 28 | let mut opts = usvg::Options::default(); 29 | opts.fontdb = Arc::new(font_database.clone()); 30 | let doc = usvg::roxmltree::Document::parse_with_options(svg, xml_opt)?; 31 | let rtree = usvg::Tree::from_xmltree(&doc, &opts)?; 32 | 33 | let mut pixmap = tiny_skia::Pixmap::new( 34 | (rtree.size().width() * scale) as u32, 35 | (rtree.size().height() * scale) as u32, 36 | ) 37 | .unwrap(); 38 | 39 | let transform = tiny_skia::Transform::from_scale(scale, scale); 40 | render(&rtree, transform, &mut pixmap.as_mut()); 41 | Ok(pixmap.encode_png()) 42 | }); 43 | match response { 44 | Ok(Ok(Ok(png_result))) => Ok(png_result), 45 | Ok(Err(err)) => Err(err), 46 | err => panic!("{err:?}"), 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /avenger-vega/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[allow(unused_imports)] 2 | #[macro_use] 3 | extern crate lazy_static; 4 | 5 | pub mod error; 6 | pub mod image; 7 | pub mod marks; 8 | pub mod scene_graph; 9 | -------------------------------------------------------------------------------- /avenger-vega/src/marks/mark.rs: -------------------------------------------------------------------------------- 1 | use crate::marks::arc::VegaArcItem; 2 | use crate::marks::area::VegaAreaItem; 3 | use crate::marks::group::VegaGroupItem; 4 | use crate::marks::image::VegaImageItem; 5 | use crate::marks::line::VegaLineItem; 6 | use crate::marks::path::VegaPathItem; 7 | use crate::marks::rect::VegaRectItem; 8 | use crate::marks::rule::VegaRuleItem; 9 | use crate::marks::shape::VegaShapeItem; 10 | use crate::marks::symbol::VegaSymbolItem; 11 | use crate::marks::text::VegaTextItem; 12 | use crate::marks::trail::VegaTrailItem; 13 | use serde::{Deserialize, Serialize}; 14 | 15 | pub trait VegaMarkItem {} 16 | 17 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 18 | #[serde(rename_all = "camelCase")] 19 | #[serde(tag = "marktype")] 20 | pub enum VegaMark { 21 | Arc(VegaMarkContainer), 22 | Area(VegaMarkContainer), 23 | Image(VegaMarkContainer), 24 | Group(VegaMarkContainer), 25 | Line(VegaMarkContainer), 26 | Path(VegaMarkContainer), 27 | Rect(VegaMarkContainer), 28 | Rule(VegaMarkContainer), 29 | Shape(VegaMarkContainer), 30 | Symbol(VegaMarkContainer), 31 | Text(VegaMarkContainer), 32 | Trail(VegaMarkContainer), 33 | } 34 | 35 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 36 | pub struct VegaMarkContainer { 37 | #[serde(default)] 38 | pub clip: bool, 39 | pub interactive: bool, 40 | #[serde(default)] 41 | pub items: Vec, 42 | pub name: Option, 43 | pub role: Option, 44 | pub zindex: Option, 45 | } 46 | -------------------------------------------------------------------------------- /avenger-vega/src/marks/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod arc; 2 | pub mod area; 3 | pub mod group; 4 | pub mod image; 5 | pub mod line; 6 | pub mod mark; 7 | pub mod path; 8 | pub mod rect; 9 | pub mod rule; 10 | pub mod shape; 11 | pub mod symbol; 12 | pub mod text; 13 | pub mod trail; 14 | pub mod values; 15 | -------------------------------------------------------------------------------- /avenger-vega/src/scene_graph.rs: -------------------------------------------------------------------------------- 1 | use crate::error::AvengerVegaError; 2 | use crate::marks::group::VegaGroupItem; 3 | use crate::marks::mark::VegaMarkContainer; 4 | use avenger_scenegraph::scene_graph::SceneGraph; 5 | use serde::{Deserialize, Serialize}; 6 | 7 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 8 | pub struct VegaSceneGraph { 9 | pub width: f32, 10 | pub height: f32, 11 | pub origin: [f32; 2], 12 | pub scenegraph: VegaMarkContainer, 13 | } 14 | 15 | impl VegaSceneGraph { 16 | #[tracing::instrument(skip_all)] 17 | pub fn to_scene_graph(&self) -> Result { 18 | Ok(SceneGraph { 19 | groups: self.scenegraph.to_scene_graph(false)?, 20 | width: self.width, 21 | height: self.height, 22 | origin: self.origin, 23 | }) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /avenger-vega/tests/test_parsing.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | mod tests { 3 | use avenger_vega::scene_graph::VegaSceneGraph; 4 | use std::fs; 5 | 6 | #[test] 7 | fn try_it() { 8 | let category = "rule"; 9 | let spec_name = "wide_rule_axes"; 10 | let specs_dir = format!( 11 | "{}/../avenger-vega-test-data/vega-scenegraphs/{category}", 12 | env!("CARGO_MANIFEST_DIR") 13 | ); 14 | 15 | // Read scene graph spec 16 | let scene_spec_str = 17 | fs::read_to_string(format!("{specs_dir}/{spec_name}.sg.json")).unwrap(); 18 | let scene_spec: VegaSceneGraph = serde_json::from_str(&scene_spec_str).unwrap(); 19 | 20 | println!("{:#?}", scene_spec); 21 | 22 | // Convert to scene graph 23 | 24 | let sg = scene_spec.to_scene_graph().unwrap(); 25 | println!("{sg:#?}"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /avenger-wgpu/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "avenger-wgpu" 3 | version = "0.0.8" 4 | edition = "2021" 5 | description = "WGPU rendering engine for the Avenger visualization framework" 6 | license = "BSD-3-Clause" 7 | repository = "https://github.com/jonmmease/avenger" 8 | 9 | [lib] 10 | crate-type = [ "cdylib", "rlib",] 11 | 12 | [features] 13 | default = [ "cosmic-text", "rayon",] 14 | cosmic-text = [ "dep:cosmic-text", "lazy_static",] 15 | deno = [] 16 | 17 | [dependencies] 18 | cfg-if = "1" 19 | winit = { workspace = true } 20 | wgpu = { workspace = true } 21 | pollster = "0.4.0" 22 | itertools = "0.13.0" 23 | image = { workspace = true } 24 | futures-intrusive = "^0.5" 25 | etagere = "0.2.10" 26 | colorgrad = "0.7.0" 27 | 28 | [dev-dependencies] 29 | dssim = "3.2.4" 30 | rstest = "0.23.0" 31 | 32 | [dependencies.avenger-scenegraph] 33 | path = "../avenger-scenegraph" 34 | version = "0.0.8" 35 | 36 | [dependencies.rayon] 37 | workspace = true 38 | optional = true 39 | 40 | [dependencies.tracing] 41 | workspace = true 42 | 43 | [dependencies.thiserror] 44 | workspace = true 45 | 46 | [dependencies.bytemuck] 47 | version = "1.14" 48 | features = [ "derive",] 49 | 50 | [dependencies.lazy_static] 51 | workspace = true 52 | optional = true 53 | 54 | [dependencies.pyo3] 55 | workspace = true 56 | optional = true 57 | 58 | [dependencies.cosmic-text] 59 | version = "0.12.1" 60 | optional = true 61 | 62 | [dependencies.lyon] 63 | workspace = true 64 | 65 | [dev-dependencies.avenger-vega] 66 | path = "../avenger-vega" 67 | features = [ "image-request", "svg",] 68 | version = "0.0.8" 69 | 70 | [dev-dependencies.serde_json] 71 | version = "1.0.111" 72 | 73 | [target."cfg(target_arch = \"wasm32\")".dependencies.wgpu] 74 | version = "23.0.1" 75 | default-features = false 76 | 77 | [target."cfg(target_arch = \"wasm32\")".dependencies.web-sys] 78 | version = "0.3.67" 79 | features = [ "Document", "Window", "Element", "HtmlCanvasElement",] 80 | -------------------------------------------------------------------------------- /avenger-wgpu/README.md: -------------------------------------------------------------------------------- 1 | ## avenger-wgpu 2 | 3 | This crate supports rendering Avenger SceneGraphs using wgpu 4 | -------------------------------------------------------------------------------- /avenger-wgpu/src/error.rs: -------------------------------------------------------------------------------- 1 | use lyon::tessellation::TessellationError; 2 | use thiserror::Error; 3 | 4 | #[cfg(feature = "pyo3")] 5 | use pyo3::{exceptions::PyValueError, PyErr}; 6 | 7 | #[cfg(target_arch = "wasm32")] 8 | use web_sys::{js_sys::Object, wasm_bindgen::JsValue}; 9 | 10 | #[derive(Error, Debug)] 11 | pub enum AvengerWgpuError { 12 | #[error("Avenger error")] 13 | AvengerError(#[from] avenger_scenegraph::error::AvengerError), 14 | 15 | #[error("Device request failed")] 16 | RequestDeviceError(#[from] wgpu::RequestDeviceError), 17 | 18 | #[error("Failed to create surface")] 19 | CreateSurfaceError(#[from] wgpu::CreateSurfaceError), 20 | 21 | #[error("Failed to create surface")] 22 | SurfaceError(#[from] wgpu::SurfaceError), 23 | 24 | #[error("WGPU adapter creation failed")] 25 | MakeWgpuAdapterError, 26 | 27 | #[error("lyon tessellation error")] 28 | TessellationError(#[from] TessellationError), 29 | 30 | #[error("Image allocation error: {0}")] 31 | ImageAllocationError(String), 32 | 33 | #[error("Conversion error: {0}")] 34 | ConversionError(String), 35 | 36 | #[error("Text support is not enabled: {0}")] 37 | TextNotEnabled(String), 38 | 39 | #[error("Text error: {0}")] 40 | TextError(String), 41 | 42 | #[cfg(target_arch = "wasm32")] 43 | #[error("JavaScript error")] 44 | JsError(JsValue), 45 | 46 | #[cfg(target_arch = "wasm32")] 47 | #[error("JavaScript error")] 48 | JsObjectError(Object), 49 | } 50 | 51 | // Conversion to PyO3 error 52 | #[cfg(feature = "pyo3")] 53 | impl From for PyErr { 54 | fn from(err: AvengerWgpuError) -> PyErr { 55 | PyValueError::new_err(err.to_string()) 56 | } 57 | } 58 | 59 | #[cfg(target_arch = "wasm32")] 60 | impl From for AvengerWgpuError { 61 | fn from(value: JsValue) -> Self { 62 | AvengerWgpuError::JsError(value) 63 | } 64 | } 65 | 66 | #[cfg(target_arch = "wasm32")] 67 | impl From for AvengerWgpuError { 68 | fn from(value: Object) -> Self { 69 | AvengerWgpuError::JsObjectError(value) 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /avenger-wgpu/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "cosmic-text")] 2 | #[macro_use] 3 | extern crate lazy_static; 4 | 5 | pub mod canvas; 6 | pub mod error; 7 | pub mod marks; 8 | pub mod util; 9 | 10 | #[cfg(target_arch = "wasm32")] 11 | pub mod html_canvas; 12 | 13 | #[cfg(feature = "cosmic-text")] 14 | pub use crate::marks::cosmic::register_font_directory; 15 | -------------------------------------------------------------------------------- /avenger-wgpu/src/marks/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod gradient; 2 | pub mod image; 3 | pub mod instanced_mark; 4 | pub mod multi; 5 | pub mod symbol; 6 | pub mod text; 7 | 8 | #[cfg(feature = "cosmic-text")] 9 | pub mod cosmic; 10 | -------------------------------------------------------------------------------- /avenger-wgpu/src/util.rs: -------------------------------------------------------------------------------- 1 | #[macro_export] 2 | macro_rules! par_izip { 3 | // Define the closure for flattening the tuple in a map call for parallel processing. 4 | ( @closure $p:pat => $tup:expr ) => { 5 | |$p| $tup 6 | }; 7 | 8 | ( @closure $p:pat => ( $($tup:tt)* ) , $_iter:expr $( , $tail:expr )* ) => { 9 | par_izip!(@closure ($p, b) => ( $($tup)*, b ) $( , $tail )*) 10 | }; 11 | 12 | // Unary case: Convert a single iterable into a parallel iterator. 13 | ($first:expr $(,)*) => { 14 | rayon::prelude::IntoParallelRefIterator::par_iter(&$first) 15 | }; 16 | 17 | // Binary case: Zip two parallel iterators. 18 | ($first:expr, $second:expr $(,)*) => { 19 | par_izip!($first) 20 | .zip($second) 21 | }; 22 | 23 | // N-ary case: Zip multiple parallel iterators and flatten the tuple. 24 | ( $first:expr $( , $rest:expr )* $(,)* ) => { 25 | par_izip!($first) 26 | $( 27 | .zip($rest) 28 | )* 29 | .map( 30 | par_izip!(@closure a => (a) $( , $rest )*) 31 | ) 32 | }; 33 | } 34 | 35 | #[cfg(test)] 36 | mod tests { 37 | use rayon::prelude::*; 38 | 39 | #[test] 40 | fn try_it() { 41 | let v = par_izip!(vec![1, 2, 3], vec![1, 2, 3], vec![1, 2, 3]) 42 | .map(|(a, b, c)| { 43 | println!("{a}, {b}, {c}"); 44 | a + b + c 45 | }) 46 | .collect::>(); 47 | println!("{v:?}"); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /doc/images/cars_scatter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/doc/images/cars_scatter.png -------------------------------------------------------------------------------- /doc/images/isotype_emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonmmease/avenger/cf887c83e0342323c859e88a78b74f5a3ec176ef/doc/images/isotype_emoji.png -------------------------------------------------------------------------------- /examples/scatter-panning/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "scatter-panning" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | crate-type = ["cdylib", "rlib"] 8 | 9 | # Empty workspace needed so cargo doesn't try to add example as a workspace member 10 | [workspace] 11 | 12 | [dependencies] 13 | avenger-vega = { path = "../../avenger-vega" } 14 | avenger-wgpu = { path = "../../avenger-wgpu", default-features = false } 15 | avenger-scenegraph = { path = "../../avenger-scenegraph" } 16 | 17 | cfg-if = "1" 18 | winit = "0.30.5" 19 | env_logger = "0.10" 20 | log = "0.4" 21 | wgpu = "23.0.1" 22 | pollster = "0.3" 23 | serde_json = { version = "1.0.111" } 24 | rand = "0.8.5" 25 | tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } 26 | 27 | [target.'cfg(target_arch = "wasm32")'.dependencies] 28 | console_error_panic_hook = "0.1.6" 29 | console_log = "1.0" 30 | wgpu = { version = "0.19.3", features = ["webgl", "webgpu"], default-features = false} 31 | wasm-bindgen = "0.2.92" 32 | wasm-bindgen-futures = "0.4.30" 33 | getrandom = { version = "*", features = ["js"]} 34 | web-sys = { version = "0.3.67", features = [ 35 | "Document", 36 | "Window", 37 | "Element", 38 | ]} -------------------------------------------------------------------------------- /examples/scatter-panning/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Learn WGPU 9 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/scatter-panning/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod util; 2 | pub use util::run; 3 | -------------------------------------------------------------------------------- /examples/scatter-panning/src/main.rs: -------------------------------------------------------------------------------- 1 | use crate::util::run; 2 | 3 | mod util; 4 | 5 | fn main() { 6 | pollster::block_on(run()); 7 | } 8 | -------------------------------------------------------------------------------- /examples/vega-renderer/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /examples/vega-renderer/bootstrap.js: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | // A dependency graph that contains any wasm must all be imported 19 | // asynchronously. This `bootstrap.js` file does the single async import, so 20 | // that no one else needs to worry about it again. 21 | import("./index.js") 22 | .catch(e => console.error("Error importing `index.js`:", e)); 23 | -------------------------------------------------------------------------------- /examples/vega-renderer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello Avenger WASM! 6 | 7 | 8 |

See console

9 |
10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/vega-renderer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vega-renderer", 3 | "version": "0.1.0", 4 | "description": "create an app to consume rust-generated wasm packages", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "webpack --config webpack.config.js", 8 | "start": "webpack-dev-server" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/rustwasm/create-wasm-app.git" 13 | }, 14 | "keywords": [ 15 | "webassembly", 16 | "wasm", 17 | "rust", 18 | "webpack" 19 | ], 20 | "author": "Jon Mease ", 21 | "license": "(MIT OR Apache-2.0)", 22 | "bugs": { 23 | "url": "https://github.com/rustwasm/create-wasm-app/issues" 24 | }, 25 | "homepage": "https://github.com/rustwasm/create-wasm-app#readme", 26 | "dependencies": { 27 | "avenger-vega-renderer": "../../avenger-vega-renderer/dist", 28 | "vega-embed": "^6.24.0" 29 | }, 30 | "devDependencies": { 31 | "webpack": "5.88.2", 32 | "webpack-cli": "5.1.4", 33 | "webpack-dev-server": "4.15.1", 34 | "copy-webpack-plugin": "6.4.1" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /examples/vega-renderer/webpack.config.js: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 19 | const path = require('path'); 20 | 21 | module.exports = { 22 | entry: "./bootstrap.js", 23 | output: { 24 | path: path.resolve(__dirname, "dist"), 25 | filename: "bootstrap.js", 26 | }, 27 | mode: "development", 28 | experiments: { 29 | asyncWebAssembly: true, // enabling async WebAssembly 30 | }, 31 | module: { 32 | rules: [ 33 | { 34 | test: /\.wasm$/, 35 | type: "webassembly/async", 36 | }, 37 | ], 38 | }, 39 | plugins: [ 40 | new CopyWebpackPlugin({ 41 | patterns: [ 42 | { from: 'index.html', to: 'index.html' }, // If you want to keep the destination filename same as source filename 43 | ], 44 | }), 45 | ], 46 | }; 47 | -------------------------------------------------------------------------------- /examples/wgpu-winit/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wgpu-winit" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | crate-type = ["cdylib", "rlib"] 8 | 9 | # Empty workspace needed so cargo doesn't try to add example as a workspace member 10 | [workspace] 11 | 12 | [dependencies] 13 | avenger-vega = { path = "../../avenger-vega" } 14 | avenger-wgpu = { path = "../../avenger-wgpu", default-features = false } 15 | avenger-scenegraph = { path = "../../avenger-scenegraph" } 16 | 17 | cfg-if = "1" 18 | winit = "0.30.5" 19 | env_logger = "0.10" 20 | log = "0.4" 21 | wgpu = "23.0.1" 22 | pollster = "0.3" 23 | serde_json = { version = "1.0.111" } 24 | 25 | [target.'cfg(target_arch = "wasm32")'.dependencies] 26 | console_error_panic_hook = "0.1.6" 27 | console_log = "1.0" 28 | wgpu = { version = "0.19.3", features = ["webgl", "webgpu"]} 29 | wasm-bindgen = "0.2.92" 30 | wasm-bindgen-futures = "0.4.42" 31 | web-sys = { version = "0.3.67", features = [ 32 | "Document", 33 | "Window", 34 | "Element", 35 | ]} -------------------------------------------------------------------------------- /examples/wgpu-winit/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Learn WGPU 9 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/wgpu-winit/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod util; 2 | pub use util::run; 3 | -------------------------------------------------------------------------------- /examples/wgpu-winit/src/main.rs: -------------------------------------------------------------------------------- 1 | mod util; 2 | use crate::util::run; 3 | 4 | fn main() { 5 | pollster::block_on(run()); 6 | } 7 | -------------------------------------------------------------------------------- /pixi.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "avenger" 3 | version = "0.0.1" 4 | description = "Add a short description here" 5 | authors = ["Jon Mease "] 6 | channels = ["conda-forge"] 7 | platforms = ["osx-arm64", "osx-64", "linux-64", "win-64"] 8 | 9 | [tasks] 10 | dev-py = { cmd = ["maturin", "develop", "-m", "avenger-python/Cargo.toml", "--release"]} 11 | build-py = { cmd = ["maturin", "build", "-m", "avenger-python/Cargo.toml", "--sdist", "--release"]} 12 | bump-version = { cmd = ["python", "automation/bump_version.py"] } 13 | 14 | [tasks.build-vega-renderer] 15 | cwd = "avenger-vega-renderer" 16 | cmd = """ 17 | npm install && 18 | rm -rf lib/ && 19 | 20 | wasm-pack build --target web --out-dir lib && 21 | 22 | rm -rf dist/ && 23 | mkdir -p dist/ && 24 | cp -r js dist/js && 25 | cp -r lib dist/ && 26 | cp package.json dist/ 27 | """ 28 | 29 | [tasks.pack-vega-renderer] 30 | depends_on = ["build-vega-renderer"] 31 | cwd = "avenger-vega-renderer" 32 | cmd = """ 33 | rm -rf packed/ && 34 | mkdir -p packed/ && 35 | npm pack && 36 | mv avenger-vega-renderer-*.tgz packed 37 | """ 38 | 39 | [tasks.test-vega-renderer] 40 | depends_on = ["build-vega-renderer"] 41 | cwd = "avenger-vega-renderer" 42 | cmd = """ 43 | pytest 44 | """ 45 | 46 | [tasks.publish-rs] 47 | cmd = """ 48 | cargo publish -p avenger && 49 | cargo publish -p avenger-vega && 50 | cargo publish -p avenger-wgpu 51 | """ 52 | 53 | [dependencies] 54 | python = "3.12.*" 55 | jupyterlab = ">=4.0.11,<4.1" 56 | maturin = ">=1.4.0,<1.5" 57 | pip = ">=23.3.2,<23.4" 58 | vl-convert-python = ">=1.2.2,<1.3" 59 | altair = ">=5.2.0,<5.3" 60 | vega_datasets = ">=0.9.0,<0.10" 61 | vegafusion = "1.6.7.*" 62 | vegafusion-python-embed = "1.6.7.*" 63 | click = ">=8.1.7,<8.2" 64 | toml = ">=0.10.2,<0.11" 65 | nodejs = "20.*" 66 | bokeh = ">=3.4.0,<3.5" 67 | pixi-pycharm = ">=0.0.3,<0.1" 68 | pillow = ">=10.3.0,<10.4" 69 | ruff = ">=0.3.7,<0.4" 70 | deno = ">=1.42.4,<1.43" 71 | protobuf = ">=4.25.3,<4.26" 72 | 73 | [pypi-dependencies] 74 | pytest-playwright = "*" 75 | pixelmatch = "*" 76 | --------------------------------------------------------------------------------