Evolution du nombre de voix FN en Lorraine

Evolution du nombre de voix FN en Lorraine

by Thomas Toussaint

HTML

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

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

JavaScript

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Evolution du nombre de voix FN en Lorraine'
        },
        subtitle: {
            text: 'Source: http://www.interieur.gouv.fr/'
        },
        xAxis: {
            categories: ['Reg 1998', 'PR 2002', 'Reg 2004', 'PR 2007', 'Reg 2010', 'PR 2012', 'E 2014', 'Dep 2015', 'Reg 2015'
						],
            crosshair: true
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Nombre de voix'
            }
        },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="padding:0"><b>{point.y:.0f} voix </b></td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            column: {
                pointPadding: 0.2,
                borderWidth: 0
            }
        },
        series: [{
            name: '1er tour',
            data: [134453,231897,152702,196698,98269,308392,202837,234373, 280387],
						color:'#00008B'
        }, {
            name: '2nd tour',
            data: [0,246963,163785, 0,138549, 0, 0,222996,340450]

        }]
    });
});