title: saveSvgAsPng - getBBox is not a function
body: <p>I'm using exupero's saveSvgAsPng library to save SVG's to PNG-files, but I've run into a problem when combining it with Angular-Nvd3.</p>
  
  <p>I get an error saying: </p>
  
  <blockquote>
    <p>Uncaught TypeError: el.getBBox is not a function</p>
  </blockquote>
  
  <p>Which to me seems like the function cannot "grab" the SVG-element from my nvd3-element.</p>
  
  <p>My code looks like this:</p>
  
  <p>HTML:</p>
  
  <pre><code>  &lt;button onclick = "saveAsPng();" type="button" name="button"&gt;&lt;/button&gt;
  
              &lt;div id = "chart1-canvas"&gt;
                &lt;nvd3 id = "chart1-svg" options="options1" data="data1"&gt;&lt;/nvd3&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>Javascript: </p>
  
  <pre><code>  function saveAsPng(){
      saveSvgAsPng(document.getElementById("chart1-svg"), "diagram.png");
    }
  </code></pre>
  
  <p>Any suggestions on how to make this work properly would be appreciated.</p>