

<!-- jqplotsimpledonut -->
<div id="{{htmlid}}" class="{{{class}}}" style="{{htmlstyle}}"></div>

<script type="text/javascript">
    $.jqplot.config.enablePlugins = true;

    var data{{htmlid}} = {{{jsondata}}};

    var plotconfig{{plotid}} = {
        {{{plotattrs}}}
        seriesDefaults: {

            // make this a donut chart.
            renderer:$.jqplot.DonutRenderer,

            rendererOptions:{
                // Donut's can be cut into slices like pies.
                sliceMargin: 3,
                // Pies and donuts can start at any arbitrary angle.
                startAngle: -90,
                {{#customcolors}}
                seriesColors: [
                    {{{customcolors}}}
                ],
                {{/customcolors}}
                showDataLabels: true,
                dataLabelNudge: 10,
                // By default, data labels show the percentage of the donut/pie.
                // You can show the data 'value' or data 'label' instead.
                dataLabels: 'label',
                // "totalLabel=true" uses the centre of the donut for the total amount
                totalLabel: false,
                shadowAlpha: {{{shadowalpha}}}
            }
        },
        cursor: {
            show: false
        },
        target: {
            backgroundColor: 'transparent'
        },
        grid: {
            background: 'transparent',
            borderColor: 'transparent',
            borderWidth: 0,
            shadow: false
        },
    };

    var plot{{plotid}} = $.jqplot('{{htmlid}}', [data{{htmlid}}], plotconfig{{plotid}});
</script>
<!-- /jqplotsimpledonut -->