Simple Statistical Chart ichartjs uses "", ichartjs ""
1. Download, Click to download
2,You only need to paste this js file and assign it to your project.
3. Introduce js
<script type="text/javascript" src="../js/ichart.1.2.min.js"></script><script type="text/javascript" src="../js/jquery.min.js"></script>
Note: (1) Adjust the path based on actual conditions.
(2) Baidu, which jquery does not have.
4. Add the places where the chart needs to be displayed
<div id="canvasDiv"></div>
5. Add the final js Code
Note: you can click this js copy to select the desired type.
$(function(){ var data = [ {name : 'IE',value : 35.75,color:'#a5c2d5'}, {name : 'Chrome',value : 29.84,color:'#cbab4f'}, {name : 'Firefox',value : 24.88,color:'#76a871'}, {name : 'Safari',value : 6.77,color:'#9f7961'}, {name : 'Opera',value : 2.02,color:'#a56f8f'}, {name : 'Other',value : 0.73,color:'#6f83a5'} ]; new iChart.Column2D({ render : 'canvasDiv', data: data, title : 'Top 5 Browsers from 1 to 29 Feb 2012', showpercent:true, decimalsnum:2, width : 800, height : 400, coordinate:{ background_color:'#fefefe', scale:[{ position:'left', start_scale:0, end_scale:40, scale_space:8, listeners:{ parseText:function(t,x,y){ return {text:t+"%"} } } }] } }).draw(); });
A simple chart is complete!
Http://blog.csdn.net/sinat_29325027