$x=0;
echo "
function loop() {
ctx.clearRect(0, 0, canvas.width, canvas.height);";
$qt=mysql_query("select sales from gd_graph");
$y = mysql_result($qt, $x);
$x+=1;
echo "
yy_prev=yy;
yy=" . $y .";\n";
echo "
for(var i = 0; i < NUM_PARTICLES; i++) {
particles[i].update();
ctx.moveTo(particles[i].x, yy);
ctx.lineTo(particles[i].x - particles[i].xvel, yy_prev);
ctx.stroke();
ctx.closePath();
}
setTimeout(loop, 1000);
}
any ideas much appreciated
cheers
Abbey
** Edit **

New Topic/Question
Reply



MultiQuote



|