Highcharts Demo

author(s): Torstein Hønsi

by vigneshwaranr

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="pagec3886_box2" style="width: 300px; height: 300px;" data-highcharts-chart="2" />

JavaScript

jQuery(function () {
    var chart;
    jQuery(document).ready(function () {
        chart = new Highcharts.Chart({
            chart: {
                width: 300,
                height: 300,
                renderTo: 'pagec3886_box2',
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false
            },
            credits: {
                enabled: false
            },
            title: {
                text: 'Open CRUSs by Priority'
            },
            tooltip: {
                formatter: function () {
                    return '<b>' + this.point.name + '</b>: <br />' + this.percentage.toFixed(2) + ' %' + '  ( ' + this.y + ' )';
                }
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        connectorColor: '#000000',
                        formatter: function () {
                            return '<b>' + this.point.name + '</b>: ' + this.percentage.toFixed(2) + ' %' + '  ( ' + this.y + ' )';
                        }
                    }
                }
            },
            series: [{
                type: 'pie',
                data: [
                    ['P0', 1],
                    ['P1', 35],
                    ['P2', 351],
                    ['P3', 887],
                    ['P4', 266],
                    ['P5', 4]
                ],
                showInLegend: true
            }]
        });
    });
});