title: How to add back to DOM an existing D3 SVG chart?
body: <p>Hi have a D3 SVG object:</p>
  
  <pre><code> d3.select("#chart").append("svg")
  .attr('id', 'chartId' + idx)
  </code></pre>
  
  <p>To which I append rects to create a bar chart.</p>
  
  <p>I would like to be able to add and remove it from the DOM.</p>
  
  <p>I am able to remove it easily with:</p>
  
  <pre><code>d3.select('svg#chartId' + j).remove();
  </code></pre>
  
  <p>How can I re-append the entire SVG chart I just removed?</p>