Title in Donut

by kzoon

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px; width: 400"></div>

JavaScript

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'pie',
            events: {
                load: function () {
                    var chart = this,
                      rend = chart.renderer,
                        pie = chart.series[0],
                        left = chart.plotLeft + pie.center[0],
                        top = chart.plotTop + pie.center[1],               
                        text = rend.text("text", left, top).attr({
                            'text-anchor': 'middle'
                        }).add();

         

                }
            }
        },

        legend: {
            //enabled: false,
            layout: 'vertical',
            align: 'right'
        },
  /*                 title: {
            text: 'Browsers',
            verticalAlign: 'middle',
                 y:15
        },
        subtitle: {
            text: 'Market share',
            verticalAlign: 'middle', y:28

        },
*/

        plotOptions: {
            pie: {
                innerSize: 120,
                showInLegend: true
            }
        },

        series: [{
            data: [
                ['Firefox ', 44.2],
                ['IE7', 26.6],
                ['IE6', 20],
                ['Chrome', 3.1],
                ['Other', 5.4]
            ]
        }]
    });
});