EU ETS emissions by year

author(s): Phil MacDonald

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

Highcharts.chart('container', {
    chart: {
        zoomType: 'xy'
    },
    title: {
        text: 'ETS emissions by year, with % change'
    },
    subtitle: {
        text: 'Source: EUTL, including pre-2013 EEA scope adjustments'
    },
    xAxis: [{
        categories: ['2005', '2006', '2007', '2008', '2009', '2010',
            '2011', '2012', '2013', '2014', '2015', '2016'],
        crosshair: true
    }],
    yAxis: [{ // Primary yAxis
        labels: {
            format: '{value}Mt',
            style: {
                color: Highcharts.getOptions().colors[1]
            }
        },
        title: {
            text: 'Total emissions',
            style: {
                color: Highcharts.getOptions().colors[1]
            }
        }
    }, { // Secondary yAxis
        title: {
            text: 'Percentage change',
            style: {
                color: Highcharts.getOptions().colors[0]
            }
        },
        labels: {
            format: '{value}%',
            style: {
                color: Highcharts.getOptions().colors[0]
            }
        },
        opposite: true
    }],
    tooltip: {
        shared: true
    },
    legend: {
        layout: 'vertical',
        align: 'left',
        x: 120,
        verticalAlign: 'top',
        y: 50,
        floating: true,
        backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
    },
    series: [{
        name: 'Percentage change',
        type: 'column',
        yAxis: 1,
        data: [0, 0.26,0.71,-5.89,-11.29,2.38,-2.01,-2.07,-3.07,-4.95,-0.61,-2.40],
        tooltip: {
            valueSuffix: ' %'
        }

    }, {
        name: 'Total emissions',
        type: 'spline',
        data: [2377.2,2383.4,2400.3,2258.8,2003.9,2051.6,2010.3,1968.6,1908.2,1813.6,1802.6,1759.0],
        tooltip: {
            valueSuffix: 'Mt'
        }
    }]
});