Simple Statistical Chart ichartjs uses "", ichartjs ""

Source: Internet
Author: User
Tags ichart

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.