1<html> 2 <head> 3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 4 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 6 7 <!-- AmCharts includes --> 8 <script src="http://www.amcharts.com/lib/3/amcharts.js"></script> 9 <script src="http://www.amcharts.com/lib/3/pie.js"></script> 10 11 <!-- Export plugin includes and styles --> 12 <script src="../export.js"></script> 13 <link type="text/css" href="../export.css" rel="stylesheet"> 14 15 <style> 16 body, html { 17 height: 100%; 18 padding: 0; 19 margin: 0; 20 overflow: hidden; 21 font-size: 11px; 22 font-family: Verdana; 23 } 24 #chartdiv { 25 width: 100%; 26 height: 100%; 27 } 28 </style> 29 30 <script type="text/javascript"> 31 var chart = AmCharts.makeChart( "chartdiv", { 32 "type": "pie", 33 "titles": [ { 34 "text": "Visitors countries", 35 "size": 16 36 } ], 37 "dataProvider": [ { 38 "country": "United States", 39 "visits": 7252 40 }, { 41 "country": "China", 42 "visits": 3882 43 }, { 44 "country": "Japan", 45 "visits": 1809 46 }, { 47 "country": "Germany", 48 "visits": 1322 49 }, { 50 "country": "United Kingdom", 51 "visits": 1122 52 }, { 53 "country": "France", 54 "visits": 414 55 }, { 56 "country": "India", 57 "visits": 384 58 }, { 59 "country": "Spain", 60 "visits": 211 61 } ], 62 "valueField": "visits", 63 "titleField": "country", 64 "startEffect": "elastic", 65 "startDuration": 2, 66 "labelRadius": 15, 67 "innerRadius": "50%", 68 "depth3D": 10, 69 "balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>", 70 "angle": 15, 71 "legend": { 72 "position": "right" 73 }, 74 "export": { 75 "enabled": true, 76 "menu": [ { 77 "class": "export-main", 78 "menu": [ { 79 "label": "Download", 80 "menu": [ "PNG", "JPG", "CSV" ] 81 }, { 82 "label": "Annotate", 83 "action": "draw", 84 "menu": [ { 85 "class": "export-drawing", 86 "menu": [ "PNG", "JPG", "CANCEL" ] 87 } ] 88 } ] 89 } ] 90 } 91 } ); 92 </script> 93 </head> 94 <body> 95 <div id="chartdiv"></div> 96 </body> 97</html>