maantje/charts

Add viewbox attribute to SVG tag

Opened this issue · 1 comments

Hey. Thanks for creating this library!

To properly scale the SVGs, it would be nice to add the viewbox attribute to the rendered SVG tag. As far as I can see, that’s only one line of code. If that’s something you’d like to include, I’d be happy to make a pull request.

maantje commented

Hey @reimar,

I would be happy to include the viewBox attribute in the rendered SVG. Can you give me an example of what it would be used for? Maybe you can edit an SVG by hand to show the desired effect.

And how would it be implemented, just a viewBox string on Chart that is then added to the SVG?