I converted all dates to epoch milliseconds before getting here. Originally the date is in the format "2017-12-31T00:00:00". I cannot seem to figure out why x-axis label is incorrectly showing Jan 2018 whereas data point tooltip says Dec 2017. I am expecting x-axis labels from Jan 2017 to Dec 2017. Please let me know if I am missing anything. Thanks.
Highcharts.chart('container', {
"credits": {
"text": "",
"href": ""
},
"chart": {},
"title": {
"text": ""
},
"plotOptions": {
"series": {
"cursor": "pointer",
"animation": false
}
},
"xAxis": {
"type": "datetime",
"dateTimeLabelFormats": {
"month": "%b %Y"
},
//format: "{value:%Y-%m-%d}",
"labels": {
"useHTML": true
},
"tickInterval": 2592000000
},
"yAxis": [{
"labels": {
"format": "{value:.0f}",
"style": {
"color": "#BB5B55"
}
},
"lineWidth": 1,
"title": {
"text": "Total",
"style": {
"color": "#BB5B55"
}
}
}, {
"title": {
"text": "Trend (%)",
"style": {
"color": "#5187B9"
}
},
"lineWidth": 1,
"labels": {
"format": "{value}%",
"style": {
"color": "#5187B9"
}
},
"opposite": true
}],
"tooltip": {
"shared": true,
"useHTML": true
},
"legend": {
"align": "center",
"verticalAlign": "bottom",
"backgroundColor": "#FFFFFF"
},
"series": [{
"name": "Total",
"type": "column",
"yAxis": 0,
"data": [
[1485842400000, null],
[1488261600000, null],
[1490936400000, null],
[1493528400000, null],
[1496206800000, null],
[1498798800000, null],
[1501477200000, null],
[1504155600000, null],
[1506747600000, null],
[1509426000000, null],
[1512021600000, null],
[1514700000000, null]
],
"tooltip": {
"valueSuffix": "",
"valueDecimals": 0
}
}, {
"name": "Trend (%)",
"type": "spline",
"yAxis": 1,
"data": [
[1485842400000, null],
[1488261600000, null],
[1490936400000, null],
[1493528400000, null],
[1496206800000, null],
[1498798800000, null],
[1501477200000, null],
[1504155600000, null],
[1506747600000, null],
[1509426000000, null],
[1512021600000, null],
[1514700000000, 0.8005]
],
"tooltip": {
"valueSuffix": " %",
"valueDecimals": 2
}
}]
});