hightcharts ajax,json - Load data into Highcharts with Ajax - Stack Overflow

I am trying to update high charts on page load and on select menu change with JQUERY AJAX call. There is data being returned in [[10,1228800000],[10,1228800000]] format.The chart is blank and does not graph any of the data.

Tried several solutions posted on here but none worked.

var chart;

$(document).ready(function() {

var options = {

chart: {

renderTo: 'stats',

defaultSeriesType: 'spline'

},

title: {text:''},

xAxis: {

type: 'datetime'

},

yAxis: {},

series: []

};

var month = 'July';

$.ajax({

type: "POST",

data: "month="+month,

url: "update_visits_chart",

success: function (data) {

options.series.push(data);

chart = new Highcharts.Chart(options);

}

});

Any errors? thanks in advance.

EDIT:

MOST RECENT CODE STILL NOT WORKING:

var options = {

chart: {

renderTo: 'stats',

type: 'spline'

},

title: {

text: ''

},

xAxis: {

type:'datetime',

tickInterval: 30 * 24 * 3600 * 1000,

dateTimeLabelFormats: {

day: '%b %e'

},

labels: {

rotation: -45,

align: 'right'

}

},

yAxis: {

title: {

text: 'Number of visits'

},

min: 0

},

tooltip: {

formatter: function() {

return Highcharts.dateFormat('%b %e', this.x) +'
'+this.y+' visit(s)';

}

},

legend: {

enabled: true

},

credits: {

enabled: false

},

exporting: {

enabled: false

},

series: [{

name: 'Number of Visits',

data: []

}]

};

var month = 'July';

$.ajax({

type: "POST",

url: "update_visits_chart",

data: "month="+month,

success: function(data){

options.series[0].data = data;

chart = new Highcharts.Chart(options);

}

});