Indent labels from pie-chart - Javascript highcharts

Javascript examples for highcharts:Pie Chart

Description

Indent labels from pie-chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> 
      <script type="text/javascript">
    $(function(){/*w  w  w.  jav a  2  s  .c o  m*/
$(function () {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false
            },
            title: {
                text: 'Browser market shares at a specific website, 2010'
            },
            tooltip: {
               pointFormat: '{series.name}: <b>{point.percentage}%</b>',
               percentageDecimals: 1
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        connectorColor: '#000000',
                        formatter: function() {
                            return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %';
                        }
                    }
                }
            },
            series: [{
                type: 'pie',
                name: 'Browser share',
                data: [
                    ['Firefox',   50.0],
                    ['IE',       50.0]
                ]
            }]
        });
    });
});
    });

      </script> 
   </head> 
   <body> 
      <script src="http://github.highcharts.com/v3.0Beta/highcharts.js"></script> 
      <div id="container" style="width: 400px; height: 400px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials