chinghunglai
unread,Jul 4, 2008, 4:38:32 AM7/4/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-excanvas
Hello Sir :
I draw a stock chart by excanvas.
my code looks like :
***************************************************************************************
mt.ctx.beginPath();
mt.ctx.moveTo(mt.cleft, mt.ctop + mt.cRowHeight*3);
for (var i=1; i<ts.length-1; i++){
var x = getX(mt, i);
var y = getY(mt, ts[i].trade);
mt.ctx.lineTo(x, y);
}
mt.ctx.stroke();
***************************************************************************************
ts.length is 270 and my chart have 2~3 part code like this , so it has
540~810 moveTo(), lineTo()...
it work very nice, i draw a chart use only 40ms at my computer
but when my mouse move over the stock chart, my cpu loading become
very very heavy (almost 80~90%)
it looks like something is very busy at movemouse event. (but i didn't
implement the mousemove event)
Can anyone help me plz ?
Sorry for my bad english, many thanks for your reading...