js代码
<script type="text/javascript" src="js/canvas.js"></script> <script type="text/javascript"> new CanvasJS.Chart('chartContainer',{ theme:'light7',//主题 animationEnabled: true, title: { text: "每周消费统计表" }, data: [ { // 数据 type: "column", dataPoints: [ { label: "美食", y: 10 }, { label: "交通", y: 15 }, { label: "电影", y: 25 }, { label: "音乐", y: 30 }, { label: "出游", y: 28 }, { label: "娱乐", y: 58 }, { label: "体育", y: 78 } ] } ] }).render(); </script>