Difference between revisions of "Time series II"

From JSXGraph Wiki
Jump to navigationJump to search
Line 8: Line 8:
 
var toDate = function(datestr) {
 
var toDate = function(datestr) {
 
         var a = datestr.split('.');
 
         var a = datestr.split('.');
alert(a+' '+(new Date(a[2],a[1],a[0])).getTime());
+
//alert(a+' '+(new Date(a[2],a[1],a[0])).getTime());
         return new Date(a[2],a[1],a[0]);
+
         return new Date(a[2]*1,a[1]*1,a[0]*1);
 
     };
 
     };
  
Line 21: Line 21:
 
   ['27.1.2010',3590],
 
   ['27.1.2010',3590],
 
   ['31.1.2010',3750],
 
   ['31.1.2010',3750],
   ['03.2.2010',3810]
+
   ['3.2.2010',3810]
 
   ];
 
   ];
  
Line 52: Line 52:
 
     x[i] = Math.floor(((toDate(table[i][0])).getTime()-birthday.getTime())/(1000.0*60.0*60.0*24.0));
 
     x[i] = Math.floor(((toDate(table[i][0])).getTime()-birthday.getTime())/(1000.0*60.0*60.0*24.0));
 
     y[i] = table[i][1]*1;
 
     y[i] = table[i][1]*1;
    alert(table[i][0]+' '+x[i]);
 
 
}
 
}
 
googleStyleChart(brd,x,y,2700);
 
googleStyleChart(brd,x,y,2700);
  
 
</jsxgraph>
 
</jsxgraph>

Revision as of 19:07, 3 February 2010

The weight of Antonia Wassermann