Highcharts Demo

author(s): Torstein Hønsi

by Geo George

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<div id="container"></div>

CSS

#container {
	min-width: 310px;
	max-width: 800px;
	height: 400px;
	margin: 0 auto
}

JavaScript

Highcharts.chart('container', {

    title: {
        text: 'Solar Employment Growth by Sector, 2010-2016'
    },

    subtitle: {
        text: 'Source: thesolarfoundation.com'
    },
    xAxis: {
       categories:[2012,2013,2014,2015,2016,2017]
    },
    yAxis: {
        title: {
            text: 'Number of Employees'
        }
    },
    legend: {
        layout: 'vertical',
        align: 'right',
        verticalAlign: 'middle'
    },

    plotOptions: {

    },

    series: [{
        name: 'Australia',
        data: [43934, 52503, 57177, 69658, 97031, 119931]
    }, {
        name: 'Canada',
        data: [24916, 24064, 29742, 29851, 32490, 30282]
    }, {
        name: 'Denmark',
        data: [11744, 17722, 16005, 19771, 20185, 24377]
    }],

    responsive: {
     
    }

});