51可用代码模板网站

咨询热线:

181-1164-6936
  • 1
JS代码
当前位置:首页>实用代码>JS代码>

amcharts 图型插件示例

时间:2017-08-11 11:55点击:

直接上代码


    <!-- Styles -->  
    <style>  
    #chartdiv {  
      width: 100%;  
      height: 500px;  
    }                                                 
    </style>  
      
    <!-- Resources -->  
    <script src="https://www.amcharts.com/lib/3/amcharts.js"></script>  
    <script src="https://www.amcharts.com/lib/3/pie.js"></script>  
    <script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>  
    <link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />  
    <script src="https://www.amcharts.com/lib/3/themes/light.js"></script>  
      
    <!-- Chart code -->  
    <script>  
    var chart = AmCharts.makeChart( "chartdiv", {  
      "type": "pie",  
      "theme": "light",  
      "dataProvider": [ {  
        "country": "Lithuania",  
        "value": 26  
      }, {  
        "country": "Ireland",  
        "value": 20  
      }, {  
        "country": "Germany",  
        "value": 65  
      }, {  
        "country": "Australia",  
        "value": 39  
      }, {  
        "country": "UK",  
        "value": 19  
      }, {  
        "country": "Latvia",  
        "value": 10  
      } ],  
      "valueField": "value",  
      "titleField": "country",  
      "outlineAlpha": 0.4,  
      "depth3D": 15,  
      "balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",  
      "angle": 30,  
      "export": {  
        "enabled": true  
      }  
    } );  
    </script>  
      
    <!-- HTML -->  
    <div id="chartdiv"></div>  

51可用模板(代码)网站专为广大站长朋友提供精品模板与代码,同时免费提供网站收录。
本站域名: WWW.51KYDM.COM    联系方式:QQ:182468923    手机:18111646936
本站关键词:网站链接收录网址收录入口网站免费提交收录网站收录提交入口    网站地图
51可用模板
展开