VEuPathDB / web-monorepo

A monorepo that contains all frontend code for VEuPathDB websites
Apache License 2.0
2 stars 0 forks source link

EDA viz tab: Export plot button does not export the legend #946

Open danicahelb opened 6 months ago

danicahelb commented 6 months ago

When you export a plot with an overlay, the legend should be included in the exported plot. Currently it is not, making the exported plot useless

dmfalke commented 5 months ago

This is not straightforward. One technical challenge is that the legend is not rendered as SVG, which I would consider a requirement for it being exported. Another is that the export button is part of the plot component, and does not know about the legend, so we might need to refactor things a little bit.

The other challenge is that we would have to decide how the legend is included in the export. Some options to consider are (in order from easy to hard):

  1. Offer a separate "export legend" option (it could be in the existing dropdown, or in a different button)
  2. Combine the plot and legend into a single SVG file
  3. Combine the plot and legend via a zip file

I think option 2 would be ideal, and I would estimate that would take 1-2 weeks.

jernestmyers commented 4 months ago

This came up in our ui-infra scrum and we decided this needs further discussion.

bobular commented 3 months ago

@steve-fischer-200 and @bobular suggest that ONE file is likely too much work

user will be editing the SVG anyway

So we provide two files: plot and legend

This assumes we can get SVG from our legend div relatively easily. (can we @dmfalke ?)