Manipulating array to add through setData on highcharts
<p>I have the following data:</p>

<pre><code>var data = {"categories":["GLA Age: 65+"],"series":[{"name":"Hendon","data":[11.98]},{"name":"High Barnet","data":[17.86]},{"name":"Mill Hill","data":[13.73]},{"name":"Oakleigh","data":[17.42]},{"name":"Totteridge","data":[17.76]}]};
</code></pre>

<p>I need the 'names' to be the categories names so I'm using 'events > load' to apply this to the highcharts code:</p>

<pre><code>var seriesData = this.series;
var tCategories = [];
for (i = 0; i &lt; seriesData.length; i++) {
    tCategories.push(seriesData[i].name);
}
this.xAxis[0].setCategories(tCategories);
</code></pre>

<p>Then I need to set the 'data' into one array like</p>

<pre><code>[11.98, 17.86, 13.73, 17.42, 17.76]
</code></pre>

<p>The problem I've come across is that the first lot of data shows in the first bar:</p>

<p>example here: <a href="http://jsfiddle.net/zidski/13rexxyo/3/" rel="nofollow">http://jsfiddle.net/zidski/13rexxyo/3/</a></p>

<p>The code to create the new array ([11.98, 17.86, 13.73, 17.42, 17.76])</p>

<pre><code>var arrayofArrays = data.series.map(function (item) {
     return JSON.stringify([item.data]);
});

    var seriesString = arrayofArrays;
    seriesString = seriesString;
    var n = JSON.stringify(seriesString).replace(/\[|]|"/g, '');
    var g = '[' + n + ']';
    var h = JSON.stringify(g);

    var seriesC = JSON &amp;&amp; JSON.parse(g) || $.parseJSON(g);

    this.series[0].setData(seriesC);
</code></pre>