Donut chart with title and subtitle inside
by Hollie Szadowski
HTML
<script type="text/javascript" src="http://www.amcharts.com/lib/3/amcharts.js"></script>
<script type="text/javascript" src="http://www.amcharts.com/lib/3/pie.js"></script>
<script type="text/javascript" src="http://www.amcharts.com/lib/3/themes/none.js"></script>
<div id="chartdiv"></div>
CSS
#chartdiv {
width : 100%;
height : 500px;
font-size : 11px;
}
JavaScript
AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "none",
"allLabels": [{
"text": "This is chart title",
"align": "center",
"bold": true,
"y": 220
},{
"text": "Ans here's the subtitle as well",
"align": "center",
"bold": false,
"y": 250
}],
"dataProvider": [{
"title": "New",
"value": 4852
}, {
"title": "Returning",
"value": 9899
}],
"titleField": "title",
"valueField": "value",
"labelRadius": -130,
"radius": "42%",
"innerRadius": "60%",
"labelText": ""
});