Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate SVG & node.js #128

Open
benjimin opened this issue Oct 14, 2021 · 0 comments
Open

Deprecate SVG & node.js #128

benjimin opened this issue Oct 14, 2021 · 0 comments

Comments

@benjimin
Copy link
Collaborator

benjimin commented Oct 14, 2021

Most WPS processes here output charts in both HTML (with embedded javascript) and SVG formats. The charts are produced using altair, a python wrapper of d3.js (after wrapping by vega and vega-lite, which provide successively higher-level APIs). Note that d3 underlays most interactive data visualisations on the web.

Producing SVG output (from the server) requires using node.js to actually render the data. This is an add-on capability of altair, and enabling it adds about 420MB to the docker image (see #66), and complicates dependency version management (see #122 for an example). Deprecating server-side SVG would thus simplify the deployment.

We could instead let the data be rendered in the client web browser, as already takes place when choosing HTML format. This is potentially superior, e.g. enabling interactive tooltips (like hover the mouse over a datapoint in the pixel drill to see the date of that datapoint, illustrated in #127).

A potential downside is that some users may wish to save the chart, and prefer SVG over HTML format for that purpose. Unsure whether saving to SVG can be facilitated from the client. (It is also not difficult to extract the raw data series from the HTML chart, so saving to CSV would also be desirable if possible.)

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

No branches or pull requests

1 participant