score:2

Accepted answer

from your code it appears that your months are in thead and not tbody. so you should be really using $('thead th') selector. i would also recommend using the :parent selector to filter out empty ths

$('thead th:parent', table).each( function(i) {
    var month=$(this).text();
    options.xaxis.categories.push(month);
});

also, your series data needs to be changed if you want the x-axis to be months, you should now have only 3 series, instead of the earlier 6. and each series will now have 6 points (one for each month) instead of previous 3 points/series. so your table parsing would need to change to something like this.

options.series = [];
$('tbody tr', table).each(function (i) {
    var tr = this;
    var serie = {};
    serie.name = $('th', tr).text();
    serie.data = [];
    $('td', tr).each(function (j) {
        serie.data.push(parsefloat(this.innerhtml));
    });
    options.series.push(serie);
});

demo @ jsfiddle


Related Query

More Query from same tag