Pie chart slice first item in series - Javascript highcharts

Javascript examples for highcharts:Pie Chart

Description

Pie chart slice first item in series

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> 
      <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div> 
      <script type="text/javascript">
var data = [24.03, 10.38, 4.77, 0.91, 0.33, 0.2];
var chart = Highcharts.chart('container', {
    chart: {/*w  w  w .ja va  2  s. c  om*/
        type: 'pie',
        events: {
          load: function () {
            this.series[0].data[0].slice();
          }
        }
    },
    series: [{
        colorByPoint: true,
        data: data
    }]
});

      </script>  
   </body>
</html>

Related Tutorials