title: how to sync updates on several highchart graphs
body: <p>I have a page that has several dynamically generated highcharts that currently each update every minute based on when the chart was created.  One of my action items is to synchronize the updates to one global update clock but I can't seem to update the chart unless I do it internally.  Currently I do it like this:</p>
  
  <pre><code>var chart = new Highcharts.chart({
      chart: {
          // blah blah blah chart stuff
      }    
  }, function(chart){
      setInterval(function(){
          // get the data and update this chart
          chart.series[0].update({
              data: newSeries[0].data,
              pointStart: newSeries[0].pointStart
          }, false);
          chart.redraw();
      },60000);
  });
  </code></pre>
  
  <p>the page can have several of these at any given time that are created by the user selecting options and requesting the data from the server in JSON format.</p>
  
  <p>How do I configure it so that I can target each chart individually from a global setInterval function?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>After combining some answer to other questions I found I managed to resolve my issue by doing this:</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div id="chart_54862" class="chartContainer"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>genChart(getChartData(), 'chart_54862');
  function genChart(data, location){
      var container = $('#'+location);
      $(container).highcharts({
          // fun chart stuff
      });
  }
  </code></pre>
  
  <p>Now when I want to update the chart I just send: </p>
  
  <pre><code>// Global setInterval
  setInterval(function(){
      $('.chartContainer').each(function(){
          // get the updated json = newSeries[]
          var container = '#'+this.id;
          var chart = $(container).highcharts();
          chart.series[0].update({
              data: newSeries[0].data,
              pointStart: newSeries[0].pointStart
          }, false);
          chart.redraw();
      }, 60*1000);
  });
  </code></pre>