<canvas id="cashback" width="930" height="460"></canvas>
<script type="text/javascript" src="__TMPL__Public/js/Chart.min.js"></script>
<script>
var lineChartData_cashback_total = { labels : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'], datasets : [ { fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#0f0", data : [50,60,70,80,90,100,100,120,90,100,100,120] } ] };
var cashback = new Chart(document.getElementById("cashback").getContext("2d")).Line(lineChartData_cashback_total);
</script>
如此就OK了,char.js还可以画其他的图,效果很好看