title: Highcharts / jQuery - destroy and rebuild chart with original options
body: <p>Based on info in this thread: <a href="http://highslide.com/forum/viewtopic.php?f=9&amp;t=10262" rel="noreferrer">Implement own state - INACTIVE_STATE?</a></p>
  
  <p>I have built a chart that fits my needs - <a href="http://highslide.com/forum/viewtopic.php?f=9&amp;t=10262" rel="noreferrer">jsfiddle</a></p>
  
  <p>I added some custom controls to allow the user to show/hide all series and to check/uncheck all series.</p>
  
  <p>These all work fine.</p>
  
  <p>The last part that I want to do is allow the user to reset the chart with the original options.</p>
  
  <p>This part I also got working, but there is a problem: once the chart is rebuilt, the functions that allow the user to show/hide/check/uncheck no longer work because I have destroyed and re-specified the variable that they run off of.</p>
  
  <p>So my question(s) -</p>
  
  <ol>
  <li>is this the right way to destroy and rebuild the chart, or is there a better method?</li>
  <li>if this is the way to do it, then how do I get my show/hide/check/uncheck functions to continue to work afterward?</li>
  </ol>
  
  <p>The code to reset the chart is here:</p>
  
  <pre><code>//reset the chart to original specs
  $('#resetChart').click(function(){
      chart1.destroy();
      chart1 = new Highcharts.Chart(optionsChart1,highlightSer);
  });
  </code></pre>
  
  <p><code>highlightSer</code> is a call back function to highlight certain series.</p>
  
  <p>an example of the code which no longer works afterward:</p>
  
  <pre><code>var chart = chart1;
  $('#showAll').click(function(){
          for(i=0; i &lt; chart.series.length; i++) {
          chart.series[i].show();
      }
  });
  </code></pre>
  
  <p>thanks!</p>