以下是我的代码,
var content = document.getElementById('weatherForecastCanvas');
var ctx = content.getContext("2d");
ctx.strokeStyle = "#fff";
ctx.fillStyle = "#fff";
ctx.lineWidth = 3;
//最高1
ctx.arc(xPoints[0], yPoints[0], 3, 0, Math.PI * 2, true);
////////////////////开始最高温度的线///////////////////////////////
ctx.fillText("" + a[0] + "℃", xPoints[0] - 10, yPoints[0] + 20);
ctx.moveTo(xPoints[0], yPoints[0]);
ctx.lineTo(xPoints[1], yPoints[1]);
//最高2
ctx.arc(xPoints[1], yPoints[1], 3, 0, Math.PI * 2, true);
ctx.fillText("" + a[1] + "℃", xPoints[1] - 10, yPoints[1] + 20);
ctx.moveTo(xPoints[1], yPoints[1]);
ctx.lineTo(xPoints[2], yPoints[2]);
帮你找了几个资源
http://stackoverflow.com/questions/25480506/how-to-progressively-draw-line-animation-in-html5-canvas
http://jsfiddle.net/m1erickson/7faRQ/