Chart.js Disappear on Window Resize
<p>I'm using <code>Chart.js</code> to display a line chart in a div which is within a <code>&lt;tr&gt;</code>.</p>

<pre><code>&lt;tr class="item"&gt;...&lt;/tr&gt;
&lt;tr class="item-details"&gt;
...
    &lt;div class="col-sm-6 col-xs-12 chart-pane"&gt;
        &lt;div class="chart-container"&gt;
            ...
            &lt;div&gt;&lt;canvas id="future-chart"&gt;&lt;/canvas&gt;&lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
...
&lt;/tr&gt;
</code></pre>

<p>When the page is loaded, the <code>item-details</code> <code>&lt;tr&gt;</code> is hidden, and clicking on the <code>item</code> <code>&lt;tr&gt;</code> above it will make it show as well as call a function to draw the chart in the canvas.  This function is shown below:</p>

<pre><code>$(document).on('click', '.item', function(){
    var itemDetails = $(this).closest('tr').next('tr');
    ...
    var canvas = itemDetails.find('#future-chart').get(0);

    if (canvas) {
        ...
        // just setting data here
        var data = { 
            ...
        };
        var options = {
            responsive: true,
            maintainAspectRatio: true
        };  
        var futureChart = new Chart(context).Line(data,options);
    }   
}); 
</code></pre>

<p>The problem I'm having is that if I click the div to show when the screen is larger than 767px (), then click again to hide, resize the screen to less than 767px, and open the tr again, the chart is gone.</p>

<p>This is the only case I can find which makes the chart disappear.  If I do the opposite of the above, the chart stays there.  If I leave the <code>&lt;tr&gt;</code> open and resize the window, the chart stays just fine.</p>

<p>I have <code>Responsive</code> set to <em>True</em> and the chart resizes correctly when the <code>&lt;tr&gt;</code> is open and I resize the window.</p>

<p>I was thinking I needed to re-draw the canvas when the window is resized, however the entire chart is supposed to be re-drawn whenever the <code>&lt;tr&gt;</code> is opened, so I'm not sure exactly what is causing this. </p>