score:0

Accepted answer

first of all, as said in the comment:

success: function (chart) {
    ...
    var height = chart.xaxis[0].height;
}

you are trying to get for some unknown reason height of xaxis from the chart. meanwhile you chart variable is referring to the data from ajax call. i hope that's clear, so remove that line or change to:

success: function (chart) {

    var mychart = $('#container').highcharts();
    var dataarr = new array();
    var height = mychart.xaxis[0].height;
}

second thing, that option:

        data: 'chartdata',

is wrong, there should be an empty array, since highcharts requires array for data, not some string:

        data: [],

now, after fixing these bugs, you should go to this demo and create the same data format. that's example for required format for highcharts.

more about series.data can be found in api reference - you need to read this.


Related Query

More Query from same tag