javascript - Canvas JS causing issues -


i creating line graph in canvas js. has following dataset

    datapoints: [//array     {x: new date(date.utc (2012, 00, 1, 1,0) ), y: 26 },     {x: new date( date.utc (2012, 00, 1,2,0) ), y: 38  },     {x: new date( date.utc(2012, 00, 1,3,0) ), y: 43 },     {x: new date( date.utc(2012, 00, 1,4,0) ), y: 29},     {x: new date( date.utc(2012, 00, 1,5,0) ), y: 41},     {x: new date( date.utc(2012, 00, 1,6,0) ), y: 54},     {x: new date( date.utc(2012, 00, 1,7,0) ), y: 66},     {x: new date( date.utc(2012, 00, 1,8,0) ), y: 60},     {x: new date( date.utc(2012, 00, 1,9,0) ), y: 53},     {x: new date( date.utc(2012, 00, 1,10,0) ), y: 60}     ]   }   ] 

i understand 1,2,3 parameters in date.utc() don't understand 4th , 5th parameters. these? using

http://canvasjs.com/docs/charts/basics-of-creating-html5-chart/date-time-axis/ under heading converting in local time

date.utc() can under form:

date.utc(year, month[, day[, hour[, minute[, second[, millisecond]]]]])   

so in example:

{x: new date(date.utc (2012, 00, 1, 1,0) ), y: 26 

2012 year,
00 month,
1 day,
1 hour,
0 minute.
please notice year , month needed while other parameters optional.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -