I’m using PHP to dynamically display a value for each date/day of the week.
The format request from mysql db is YYYY-MM-DD.
How do I convert that so CanvasJS will read it correct? I see samples like the following which makes zero sense on conversion.
data: [
{
type: “area”,
dataPoints: [//array
{ x: new Date(2012, 01, 1), y: 26},
{ x: new Date(2012, 01, 3), y: 38},
{ x: new Date(2012, 01, 5), y: 43},
{ x: new Date(2012, 01, 7), y: 29},
{ x: new Date(2012, 01, 11), y: 41},
{ x: new Date(2012, 01, 13), y: 54},
{ x: new Date(2012, 01, 20), y: 66},
{ x: new Date(2012, 01, 21), y: 60},
{ x: new Date(2012, 01, 25), y: 53},
{ x: new Date(2012, 01, 27), y: 60}