Google style chart: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 19: | Line 19: | ||
function doIt() { | function doIt() { | ||
var i; | |||
var s = $('eingabe').value.strip(); | var s = $('eingabe').value.strip(); | ||
var a = s.split('\n'); | var a = s.split('\n'); | ||
var x = []; | var x = [0]; | ||
var y = []; | var y = [0]; | ||
for (var i=0;i<a.length;i++) { | for (var i=0;i<a.length;i++) { | ||
var b = a[i].split(/\s+/); | var b = a[i].split(/\s+/); | ||
Line 32: | Line 33: | ||
} | } | ||
} | } | ||
x[i] = x[i-1]; | |||
y[i] = 0; | |||
brd.createElement('curve', [x,y], {strokeWidth:3, strockeColor:'#0077cc', highlightStrokeColor:'#0077cc',fillColor:'#e6f2fa'}); | brd.createElement('curve', [x,y], {strokeWidth:3, strockeColor:'#0077cc', highlightStrokeColor:'#0077cc',fillColor:'#e6f2fa'}); | ||
} | } |
Revision as of 10:25, 9 May 2009