# RGraph: HTML5 canvas graph library - Donut chart documentation

The Donut chart was formerly a separate chart, however it's now simply a variant of the Pie chart.

    <script>
        window.onload = function ()
        {
            var data = [45,57,48,32];

            var donut = new RGraph.Pie('myDonut', data);
            donut.Set('chart.labels', ['Jan', 'Ben', 'Mark', 'Lucy']);
            donut.Set('chart.linewidth', 5);
            donut.Set('chart.strokestyle', 'white');
            donut.Set('chart.tooltips', ['Jan', 'Ben', 'Mark', 'Lucy']);
            donut.Set('chart.variant', 'donut');
            donut.Draw();
        }
    </script>

- Donut chart examples
- Pie chart documentation