Difference between revisions of "Google style chart - interactive"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
Line 25: | Line 25: | ||
); | ); | ||
− | p. | + | p.rendNode._num = i; // memorize the number of this point in the array |
− | p.rendNode.onclick = function() { | + | p.rendNode.onclick = function() { |
+ | var p = points[this._num]; | ||
var v = prompt("New value:", p.Y())*1.0; | var v = prompt("New value:", p.Y())*1.0; | ||
p.setPosition(JXG.COORDS_BY_USER, p.X(), v); | p.setPosition(JXG.COORDS_BY_USER, p.X(), v); | ||
− | y[ | + | y[this._num] = v; |
brd.update(); | brd.update(); | ||
}; | }; |