Difference between revisions of "Time series"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
Line 53: | Line 53: | ||
var date = new Date(d[0],d[1],d[2]); // Split the date into Year, Month, Day | var date = new Date(d[0],d[1],d[2]); // Split the date into Year, Month, Day | ||
if (i==0) { startDate = new Date(d[0],d[1],d[2]); } // Keep the first date in memory | if (i==0) { startDate = new Date(d[0],d[1],d[2]); } // Keep the first date in memory | ||
− | + | x1 = (date.getTime()-startDate.getTime())/ ( 1000.0*60.0*60.0*24.0 ); // The x coordinate of a value is the number of days from the first entry | |
− | + | y1 = v; | |
− | p = brd2.createElement('point', [ | + | p = brd2.createElement('point', [x1,y1], |
{strokeWidth:2, strokeColor:'#ffffff', | {strokeWidth:2, strokeColor:'#ffffff', | ||
highlightStrokeColor:'#0077cc', fillColor:'#0077cc', | highlightStrokeColor:'#0077cc', fillColor:'#0077cc', |
Revision as of 15:05, 17 June 2009