the problem facing cannot plot graph date have in data set, not considering them date due them being plotted in weird way.
currently x axis showing date 1st june 1970 if considers date want give perfect.
here code:
(i = 0; < data.length; i++){ processed_json.push([moment(data[i].day,"dd-mm-yyyy"), data[i].visitors]); // processed_json1.push([data[i].day, data[i].u]); } $('#container').highcharts({ chart: { type: 'line' }, title: { text: 'daily visits @ www.highcharts.com' }, subtitle: { text: 'source: google analytics' }, xaxis: { type: 'datetime', tickwidth: 0, gridlinewidth: 1, labels: { align: 'left', x: 3, y: -3, formatter: function() { return highcharts.dateformat('%e %b', this.value * 7 * 24 * 3600 * 1000); } } }, yaxis: [{ // left y axis title: { text: null }, labels: { align: 'left', x: 3, y: 16, format: '{value:.,0f}' }, showfirstlabel: false }, { // right y axis linkedto: 0, gridlinewidth: 0, opposite: true, title: { text: null }, labels: { align: 'right', x: -3, y: 16, format: '{value:.,0f}' }, showfirstlabel: false }], legend: { align: 'left', verticalalign: 'top', y: 20, floating: true, borderwidth: 0 }, tooltip: { shared: true, crosshairs: true, xdateformat: '%a, %b %e, %y' }, series: [{ name: 'impressions', data: processed_json}, { name: 'clicks', data: processed_json1 } ]
here data:
[ {"day":"11,10,2016","visitors":918,"u":123}, {"day":"12,10,2016","visitors":980,"u":203}, {"day":"13,10,2016","visitors":928,"u":103}, {"day":"14,10,2016","visitors":928,"u":523}, {"day":"15,10,2016","visitors":928,"u":300}, {"day":"16,10,2016","visitors":918,"u":120}, {"day":"17,10,2016","visitors":983,"u":223} ]