Highcharts Demo

author(s): Torstein Hønsi

by Rajesh Danabal

HTML

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

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

CSS

#container {
	max-width: 800px;
	min-width: 380px;
	margin: 0 auto;
}

JavaScript

Highcharts.chart('container', {

    chart: {
        type: 'column'
    },

    title: {
        text: 'Labor Costs in Europe, 2016'
    },

    subtitle: {
        text: 'Source: <a href="http://ec.europa.eu/eurostat/web/' +
            'labour-market/labour-costs/main-tables">eurostat</a>'
    },

    xAxis: {
        type: 'category',
        labels: {
        	useHTML: true,
        },
        title: {
            text: 'Column widths are proportional to GDP'
        }
    },
		plotOptions: {
			column: {
				pointPadding: 0,
				borderWidth: 0,
        slicedOffset: 2,
				pointPadding: 0.02,
				groupPadding: 0.1,
        turboThreshold: 0
			}
		},
    legend: {
        enabled: false
    },

    series: [{
        name: 'Labor Costs',
        data: [
            ['Norway is a country in the north that is part of the Nordic Council', 50.2],
            ['Denmark is also a country in the north but is a bit closer to central Europe', 42],
            ['Belgium', 39.2],
            ['Sweden', 38],
            ['France', 35.6],
            ['Netherlands', 34.3],
            ['Finland', 33.2],
            ['Germany', 33.0],
            ['Austria', 32.7],
            ['Ireland', 30.4],
            ['Italy', 2.8],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United Kingdom' + Math.random(), 2.7],
            ['United...