title: Export mermaid chart from DiagrammeR
body: <p>I'm attempting to export a Gantt chart from <code>mermaid</code> to a file through R. I'd be happy with any file format, but SVG or PNG would be preferable. I'm trying to automate this, so simply pressing export through the GUI is not an option.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>library(DiagrammeR)
  graph &lt;- mermaid("
      gantt
      dateFormat  HH:mm:ss.SSS
      title Sample Test Gantt
  
      section A
      thing1          :   15:58:51.556,   16:05:23.494
  
      section B
      thing2          :   16:02:00.391,   16:20:46.533
  
      section C
      thing3          :   16:18:57.352,   16:23:10.700
      thing4          :   16:24:11.705,   16:30:30.432
      ")
  graph
  </code></pre>
  
  <p>And the graph it generates:
  <a href="https://i.stack.imgur.com/NOjl9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NOjl9.jpg" alt="A sample Gantt chart"></a></p>