Chart.js - Clone a graph into another location
<p>I'm using <code>Chart.js</code> to draw a graph.
Here is the structure of my code :</p>

<pre><code>&lt;div id="graph_slider"&gt;
    &lt;div class="row"&gt;
        &lt;div id="first_container" class="col-md-6"&gt;
            &lt;canvas id="my_graph"&gt;&lt;/canvas&gt;
        &lt;/div&gt;
        &lt;div id="second_container" class="col-md-6"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;button type="button" id="clone"&gt;Clone graph&lt;/button&gt;

&lt;script&gt;
    var ctx = document.getElementById('my_graph').getContext('2d');

    var chart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ['Item 1', 'Item 2', 'Item 3'],
            datasets: [{data: [10, 20, 30]}]
        }
    });

    $("#clone").click(function(){
       //clone the graph... 
    });
&lt;/script&gt;
</code></pre>

<p>What I would like to do is to "clone" the graph <code>#my_graph</code> and append it to the div <code>#second_container</code> so that I could have the exact same graphs side-by-side when I click the button #clone.</p>

<p>Does someone know how to do this please?</p>