Donut chart
Donut or Doughnut chart is just a simple pie chart with a hole inside. You can define hole radius to any size you need, both in percent or pixels. <h2>Donut chart with patterns</h2> Click on PATTERNS theme above the chart - you will see that our pie or donut chart supports patterns. There are several pre-build patterns in our package or you can easily build your own fancy patterns and use them with our charts.
by mamezito
HTML
<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/themes/light.js"></script>
<div id="chartdiv"></div>
CSS
#chartdiv {
width : 100%;
height : 350px;
font-size : 11px;
}
body{background:#fff;}
JavaScript
var chart = AmCharts.makeChart( "chartdiv", {
"type": "pie",
"theme": "light",
"legend":{
"position":"bottom",
"marginBottom":100,
"autoMargins":false
},
"dataProvider": [ {
"title": "Astartis Pharma",
"value": 15
}, {
"title": "Notting hill surgery",
"value": 32
}, {
"title": "Frankfurt bio med",
"value": 48
}, {
"title": "Red and green practice",
"value": 15
}, {
"title": "Waterside clinics",
"value": 16
} , {
"title": "Highroad hospital",
"value": 10
} ],
"titleField": "title",
"valueField": "value",
"labelRadius": 5,
"labelPosition":"bottom",
"radius": "42%",
"innerRadius": "60%",
"export": {
"enabled": true
}
} );