owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.35k stars 227 forks source link

Reorder elements in Grapher's SVG output for easier manipulation in Figma #3644

Open sophiamersmann opened 1 month ago

sophiamersmann commented 1 month ago

Follow up to #3607, see Lucas comment

We recently added group and element labels to Grapher's SVG output to make it easier to navigate/manipulate exported charts in SVG editing software like Figma.

Grouping together elements of the same type would also be helpful. For example, instead of

<g id="tick">
  <line id="tick-mark" />
  <text id="tick-label" />
</g>

they prefer

<g id="tick-lines">
  <line />
  <line />
  ...
</g>
<g id="tick-labels">
  <text />
  <text />
  ...
</g>

This makes it easier to change the font size of all tick labels at once, for example.

danyx23 commented 4 weeks ago

This seems to be a bit involved on the Grapher side, so let's wait and see how high the demand for this is on the author's side