My charts are displaying dates in reverse order, can anyone help me figure out what's causing this issue?
I've checked the documentation but couldn't find anything that would explain this problem.
Link to documentation:
Here is a screenshot... https://i.sstatic.net/Yxv7r.png
and here is my code...
var chart = new CanvasJS.Chart("chartContainer", {
backgroundColor: "#2e3037",
animationEnabled: true,
axisY :{
includeZero: false,
gridColor: '#79797c',
labelFontSize: 16,
labelFontColor: "#79797c",
valueFormatString: "$#.00"
},
axisX: {
gridColor: '#79797c',
valueFormatString: "MM/DD/YY",
labelAngle: -50,
interval:1,
intervalType: "day",
labelFontColor: '#79797c',
labelFontSize: 10,
},
toolTip: {
fontColor: "white",
backgroundColor: "#6b60d4",
content: "${y}",
},
data: [{
type: "area",
showInLegend: false,
color: '#6b60d4',
fillOpacity: .1,
name: "Price at the Close of the Day",
prefix: '$',
markerSize: 0,
dataPoints: [
{x: new Date(2018, 01, 16), y: 1050.26},
{x: new Date(2018, 01, 17), y: 1024.69},
{x: new Date(2018, 01, 18), y: 1012.97},
{x: new Date(2018, 01, 19), y: 1037.36},
{x: new Date(2018, 01, 20), y: 1150.5},
{x: new Date(2018, 01, 21), y: 1049.09},
{x: new Date(2018, 01, 22), y: 999.64},
{x: new Date(2018, 01, 23), y: 984.47},
{x: new Date(2018, 01, 24), y: 1061.78},
{x: new Date(2018, 01, 25), y: 1046.37},
{x: new Date(2018, 01, 26), y: 1048.58},
{x: new Date(2018, 01, 27), y: 1109.08},
{x: new Date(2018, 01, 28), y: 1231.58},
{x: new Date(2018, 01, 29), y: 1169.96},
{x: new Date(2018, 01, 30), y: 1063.75},
{x: new Date(2018, 01, 31), y: 1111.31},
{x: new Date(2018, 02, 01), y: 1026.19},
{x: new Date(2018, 02, 02), y: 917.47},
{x: new Date(2018, 02, 03), y: 970.87},
{x: new Date(2018, 02, 04), y: 827.59},
{x: new Date(2018, 02, 05), y: 695.08},
{x: new Date(2018, 02, 06), y: 785.01},
{x: new Date(2018, 02, 07), y: 751.81},
{x: new Date(2018, 02, 08), y: 813.55},
{x: new Date(2018, 02, 09), y: 877.88},
{x: new Date(2018, 02, 10), y: 850.75},
{x: new Date(2018, 02, 11), y: 811.24},
{x: new Date(2018, 02, 12), y: 865.27},
{x: new Date(2018, 02, 13), y: 840.98},
{x: new Date(2018, 02, 14), y: 888.82}
]
}]
});
chart.render();