Caste Wise Pie Chart Demo

Caste Wise Pie Chart Demo

by mhardik

HTML

<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 300px"></div>

JavaScript

var chart;
$(document).ready(function () {
    
    chart = new Highcharts.Chart(
{
   series:[
      {
         name:"Values",
         type:"pie",
         sliced:true,
         data:[
            [
               "General",
               215
            ],
            [
               "SC",
               128
            ],
            [
               "ST",
               104
            ],
            [
               "OBC",
               119
            ]
         ],
         pointWidth:15,
         color:"#C6D9E7",
         borderColor:"#8BB6D9",
         shadow:true,
      }
   ],
  title: {
                text: 'Training Completed Candidates'
            },
            subtitle: {
                text: 'Year: 2011-2012  Region: Ahmedabad'
            },
                    tooltip: {
                        formatter: function() {
                            return '<strong>'+ this.point.name +' Candidates </strong>: '+ this.y;
                        }
                    },
   plotOptions: {
                        pie: {
                            allowPointSelect: true,
                            cursor: 'pointer',
                            dataLabels: {
                                distance: -10,
                                enabled: true,
                                color: '#000000',
                                 formatter: function() {
                                    return '<b>'+ this.point.name +'</b>: '+ this.y;
                                }
                            }
                            
                        }
                    },
   chart:{
      renderTo:"container"
   },
   credits:{
      enabled:false
   }
}        
    );
    
    
});