Time series: Difference between revisions
From JSXGraph Wiki
| A WASSERMANN (talk | contribs) No edit summary | A WASSERMANN (talk | contribs) No edit summary | ||
| 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 14:05, 17 June 2009
