Highcharts Demo

author(s): Torstein Hønsi

HTML

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

<div id="container" style="height: 400px; margin-top: 1em"></div>

JavaScript

$(function() {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false
            },
            credits: {
                text: 'BundKa.de',
                href: 'http://www.BundKa.de',
                position: {
                    align: 'left',
                    x: 10
                },
                style: {
                    cursor: 'pointer',
                    color: 'darkred',
                    fontSize: '20px'
                }
            },
            title: {
                text: 'Verteilung der Superklatschen, Gesamtplatzierung'
            },
            tooltip: {
                formatter: function() {
                    return '<b>' + this.point.name + '</b>: ' + Math.round(this.percentage) + ' %';
                }
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        connectorColor: '#000000',
                        formatter: function() {
                            return '<b>' + this.point.name + '</b>: ' + Math.round(this.percentage, 2f) + ' %';
                        }
                    }
                }
            },
            series: [{
                type: 'pie',
                name: 'VerteilungSuperklatschen',
                data: [
                    ['Baden-Württemberg', 441],
                    ['Bayern', 438],
                    ['Nordrhein-Westfalen', 322],
                    ['Niedersachsen', 214],
                    ['Berlin', 156],
                    ['Sachsen', 148],
                    ['Hamburg', 124],
                    ['Rheinland-Pfalz', 93],
          ...