rich-iannone / DiagrammeR

Graph and network visualization using tabular data in R
https://rich-iannone.github.io/DiagrammeR/
Other
1.68k stars 247 forks source link

Exporting a graph to svg/png silently does nothing if DiagrammeRsvg isn't installed #478

Closed erikvona closed 1 year ago

erikvona commented 1 year ago

As said in the title, exporting a graph to SVG or PNG does nothing if DiagrammeRsvg is not installed.

This is caused by a minor bug in export_graph, where the code throwing an error if the package isn't installed is hidden behind a check that confirms the package is installed.

yfu-caredx commented 1 year ago

I experienced the same bug today, the export_graph() did nothing and threw no error. By looking into the codes I found out the cause is not installing DiagrammeRsvg and rsvg. In my case both packages are required to finally get the function working as expected.