Difference between revisions of "Google style chart"

From JSXGraph Wiki
Jump to navigationJump to search
Line 29: Line 29:
 
                 b[1]=b[1]*1.0;
 
                 b[1]=b[1]*1.0;
 
                 if (!isNaN(b[0]) && !isNaN(b[1])) {  
 
                 if (!isNaN(b[0]) && !isNaN(b[1])) {  
                     x[i] = b[0];
+
                     x.push(b[0]);
                     y[i] = b[1];
+
                     y.push(b[1]);
 
                 }
 
                 }
 
             }
 
             }
             x[i] = x[i-1];
+
             x.push(x[i-1]);
             y[i] = 0;
+
             y.push(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 12:26, 9 May 2009