DHTMLX Docs & Samples Explorer

Donut chart

Source
<script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
<script src="../common/testdata.js"></script>
<script>
window.onload = function() {
    var pieChart = new dhtmlXChart({
        view: "donut",
        container: "chart",
        value: "#sales#",
        color: "#color#",
        tooltip: "Value <b>#sales#</b>",
        legend: {
            width: 75,
            align: "right",
            valign: "middle",
            template: "#month#";
        },
        gradient: 1,
        shadow: false;
    });
    pieChart.parse(month_dataset, "json");
}
</script> <div id="chart" style="width:400px;height:250px;border:1px solid #A4BED4;"></div>