Difference between revisions of "Google style chart - interactive"

From JSXGraph Wiki
Jump to: navigation, search
Line 26: Line 26:
  
 
     p.num = i;                          // memorize the number of this point in the array
 
     p.num = i;                          // memorize the number of this point in the array
     p.rendNode.onclick = (function() {     
+
     p.rendNode.onclick = function() {     
         var v = prompt("New value:",this.Y())*1.0;
+
         var v = prompt("New value:", p.Y())*1.0;
         this.setPosition(JXG.COORDS_BY_USER,this.X(),v);
+
         this.setPosition(JXG.COORDS_BY_USER, p.X(), v);
         y[this.num] = v;
+
         y[p.num] = v;
 
         brd.update();
 
         brd.update();
     }).apply(p);
+
     };
  
 
     points.push(p);
 
     points.push(p);

Revision as of 08:57, 6 July 2011