Skip to content

Reports: styling & other usability improvements to Vega-Lite visualizations#2540

Open
emilyanndavis wants to merge 4 commits intonatcap:mainfrom
emilyanndavis:bugfix/2532-reports-vector-plot-overflow-overlap
Open

Reports: styling & other usability improvements to Vega-Lite visualizations#2540
emilyanndavis wants to merge 4 commits intonatcap:mainfrom
emilyanndavis:bugfix/2532-reports-vector-plot-overflow-overlap

Conversation

@emilyanndavis
Copy link
Copy Markdown
Member

Description

Fixes #2532. Specifically, Vega-Lite visualizations (e.g., vector plots) are now styled to prevent them from overflowing their containers or overlapping one another. With this change, the .vega-fit-horizontal styles no longer appear to be needed, so I removed them.

I also snuck in a few other small improvements, namely:

  • All vegaEmbed elements now use the SVG renderer instead of the default canvas renderer.
  • The default filename for "Save as PNG" or "Save as SVG" downloads via the Vega actions menu is now InVEST-{elementId}, where the elementId is the id of the HTML element that contains the visualization. This ID is defined by the report author and is typically a short name that identifies the purpose of the visualization, e.g., cases_map, habitat_map, or exposure_histogram.
  • The Vega actions menu button now has slightly higher contrast to make it easier for people to discover it.

Examples

Vector plots scale down at smaller viewport widths

vector_plots_responsive-2026_05_01

New default filename when saving an SVG or PNG

vega_download_filename-2026_05_01

Vega actions menu button, before

vega_actions_button-before-2026_05_01

Vega actions menu button, after

vega_actions_button-after-2026_05_01

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
    - [ ] Updated the user's guide (if needed)
  • Tested the Workbench UI (if relevant)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reports: vector plot overflows container and format doesn't match raster plot

1 participant