nx10 / httpgd

Asynchronous http server graphics device for R.
https://nx10.github.io/httpgd
GNU General Public License v2.0
389 stars 19 forks source link

Portable SVG renderer #65

Closed nx10 closed 3 years ago

nx10 commented 3 years ago

Currently all styling information is inlined in the SVG. Add a rendering option which splits styling information in an external CSS file to allow for dynamic theming of the rendered SVGs.

nx10 commented 3 years ago

I finally got around to implement a "portable SVG" renderer which produces SVG that can directly be embedded in HTML documents without causing ID conflicts (at the expense of larger file size).

The portable SVG renderer can be tested via the "Export" dialog or with something like

hgd()
hgd_test_pattern()
hgd_plot(renderer="svgp", file="portable_test.svg")

in the latest GitHub development version.

Please let me know if you find any bugs or have additional feature requests.