ichartjs 製作的圖表

來源:互聯網
上載者:User

標籤:nat   key   turn   pre   start   zip   ima   ant   list   

ichartjs資源套件下載:https://files.cnblogs.com/files/xiandedanteng/ichartjs-ichartjs1.2.zip

本例:https://files.cnblogs.com/files/xiandedanteng/ichartjsSample01.rar

效果:

頁面代碼:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title> New Document </title>  <meta name="Generator" content="EditPlus">  <meta name="Author" content="">  <meta name="Keywords" content="">  <meta name="Description" content=""> </head>    <script src="ichart.1.2.min.js"></script> <body>  <div id=‘canvasDiv‘></div> </body></html><script type="text/javascript"><!--    //定義資料    var data = [        {name : ‘H‘,value : 7,color:‘#a5c2d5‘},           {name : ‘E‘,value : 5,color:‘#cbab4f‘},           {name : ‘L‘,value : 12,color:‘#76a871‘},           {name : ‘L‘,value : 12,color:‘#76a871‘},           {name : ‘O‘,value : 5,color:‘#a56f8f‘},           {name : ‘W‘,value : 13,color:‘#c12c44‘},           {name : ‘O‘,value : 15,color:‘#a56f8f‘},           {name : ‘R‘,value : 28,color:‘#9f7961‘},           {name : ‘L‘,value : 12,color:‘#76a871‘},           {name : ‘D‘,value : 4,color:‘#6f83a5‘}     ];     $(function(){            var chart = new iChart.Column2D({            render : ‘canvasDiv‘,//渲染的Dom目標,canvasDiv為Dom的ID            data: data,//綁定資料            title : ‘ichartjs Sample‘,//設定標題            width : 800,//設定寬度,預設單位為px            height : 400,//設定高度,預設單位為px            shadow:true,//啟用陰影            shadow_color:‘#c7c7c7‘,//設定陰影顏色            coordinate:{//配置自訂座標軸                scale:[{//配置自訂值軸                     position:‘left‘,//配置左值軸                         start_scale:0,//設定開始刻度為0                     end_scale:26,//設定結束刻度為26                     scale_space:2,//設定刻度間距                     listeners:{//配置事件                        parseText:function(t,x,y){//設定解析值軸文本                            return {text:t+" cm"}                        }                    }                }]            }        });        //調用繪圖方法開始繪圖        chart.draw();    });//--></script>

 

ichartjs 製作的圖表

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.