Pie Chart

by patelsan

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>

JavaScript

$(function () {
    var chart;
    var colors = ['#806a9b', '#4573a7','#aa4644','#89a54e']
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container'
            },
            title: {
                text: ''
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        connectorColor: '#000000',
                        formatter: function() {
                            return '<b>'+ this.point.name +'</b>: '+ this.y;
                        }
                    }
                }
            },
            series: [{
                type: 'pie',
                name: 'Revenue',
  data: [{ name: 'Closed', y: 500000, color: colors[0] }, { name: 'Lost', y: 1100000, color: colors[1] }, { name: 'Engaged', y: 1500000, color: colors[2] }, { name: 'New Pursuits', y: 1800000, color: colors[3] }                  
                ]
            }],
        credits:{
        enabled: false
        }
        });
    });
    
});