Highcharts Demo

author(s): Torstein Hønsi

by corinnekm

HTML

<script src="http://github.highcharts.com/highcharts.js"></script>
<script src="http://github.highcharts.com/modules/drilldown.js"></script>
<div id="rcs_erreur" style="min-width: 310px; height: auto; margin: 0 auto"></div>

JavaScript

$(function () {
    // Create the chart
    $('#rcs_erreur').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Pourcentage de dossiers en erreur'
        },
        xAxis: {
            type: 'category'
        },

        legend: {
            enabled: true
        },

        plotOptions: {
            series: {
                borderWidth: 0,
                dataLabels: {
                    enabled: true,
                }
            }
        },

        series: [{
            name: 'Groupements',
            colorByPoint: true,
            data: [{
                name: 'Infogreffe Informatique',
                y: 0.2,
                drilldown: 'Infogreffe'
            }, {
                name: 'Gagi',
                y: 0.3,
                drilldown: 'Gagi'
            }, {
                name: 'Paris',
                y: 0.5,
                drilldown: 'Pairs'
            }, {
                name: 'Agora',
                y: 0.1,
                drilldown: 'Agora'
            }, {
                name: 'Intergreffe',
                y: 0.14,
                drilldown: 'Intergreffe'

            }]
        }],
        drilldown: {
            _animation: {
                duration: 2000
            },
            series: [{
                id: 'Infogreffe',
                name: 'Infogreffe Informatique',
                data: [
                    ['BERGERAC', 0.2],
                    ['BOBIGNY', 0.2],
                    ['BORDEAUX', 0.1],
                    ['BRIVE', 0.3],
                    ['CANNES', 0.2],
                    ['CHAMBERY', 0.2],
                    ['COMPIEGNE', 0.12],
                    ['CRETEIL', 0.13],
                    ['EVREUX', 0.2],
                    ['EVRY', 0.2],
                    ['GRASSE', 0.2],
                    ['LA ROCHE-SUR-YON', 0.2],
                    ['MARSEILLE', 0.2],
                    ['MELUN', 0.98],
                    ['NANTERRE', 0.2],
 ...