title: Adding data to a highchart chart using an array with IDs
body: <p>I want to add a series to a highchart scatterplot where I am naming each point in the series. I create a chart in the following way:</p>
  
  <pre><code>var chart; // globally available
  
  makeCharts = function(){
  
        chart = new Highcharts.Chart({
           chart: {
              renderTo: 'container1',
              type: 'scatter'
           },        
           series: [{
              name: 'a',
                  data: [{                    
                      'id': 'point1',
                      'x': 1,
                      'y': 2
                  }, {
                      'id': 'point2',
                      'x': 2,
                      'y': 5
                  }]
              }]
  
        });
  }
  </code></pre>
  
  <p>I would like to be able to update the points on the chart using something like:</p>
  
  <pre><code>chart.series[0].setData([{id:['point3', 'point4', 'point5'], y:[0,1,2], x:[1,2,3]}])
  </code></pre>
  
  <p>but this is not correct. Is it possible to update a chart using this approach where each point has an ID?</p>
  
  <p>EDIT:</p>
  
  <p>Just to clarify, I would like to be able to pass the arrays directly, rather than adding the data point by point using <code>addPoint()</code>. I could loop through an array and use <code>addPoint()</code> doing something like this:</p>
  
  <pre><code>id:['point3', 'point4', 'point5'];
  y:[0,1,2];
  x:[1,2,3];
  
  for (i=0; i&lt;x.length; i++)
    {
    chart.series[0].addPoint({
      x:  x[[i],
      y:  y[i],
      id: id[i]
  });
  
    }
  </code></pre>
  
  <p>However, this is very slow. It's much quicker to add data using the following approach:</p>
  
  <pre><code>chart.series[0].setData([[1,0],[2,1],[3,2]]);
  </code></pre>
  
  <p>I have found that I can add data like this:</p>
  
  <pre><code> chart.series[0].setData([[1,0, 'point3'],[2,1, 'point4'],[3,2, 'point5']]);
  </code></pre>
  
  <p>but then the only way that I can access the <code>id</code> when the point is selected, is through <code>this.point.config[2]</code>. With the following approach I am unable to use <code>chart.get('pointID')</code> to identify a point as I did not set the <code>ID</code>. I want to be able to identify the point using just the <code>ID</code>.</p>