Highcharts Demo

author(s): Torstein Hønsi

by ismusidhu

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: {
        type: 'area'
    },
    title: {
        text: 'Historic and Estimated Worldwide Population Growth by Region'
    },
    subtitle: {
        text: 'Source: Wikipedia.org'
    },
    xAxis: {
        
        tickmarkPlacement: 'on',
        title: {
            enabled: false
        }
    },
    yAxis: {
        title: {
            text: 'Billions'
        },
        labels: {
            formatter: function () {
                return this.value / 1000;
            }
        }
    },
    tooltip: {
        shared: true,
        valueSuffix: ' millions'
    },
    plotOptions: {
        area: {
            stacking: 'normal',
            lineColor: '#666666',
            lineWidth: 1,
            marker: {
                lineWidth: 1,
                lineColor: '#666666'
            }
        }
    },
    series: [{
        name: 'Asia',
        data: [[1, 502], [2, 635], [3, 809], [4, 947], [5, 1402], [6, 3634], [7, 5268], [8,  5268], [9, 3634], [10, 1402], [11, 947], [12, 809], [13, 635], [14, 502]]
    }, {
        name: 'Europe',
        data: [[1, 163], [2, 203], [3, 276], [4, 408], [5, 547], [6, 729], [7, 628], [8,  628], [9, 729], [10, 547], [11, 408], [12, 276], [13, 203], [14, 163]]
    }, {
        name: 'Africa',
        data: [[1, 106], [2, 107], [3, 111], [4, 133], [5, 221], [6, 767], [7, 1766], [8, 1766], [9, 767], [10, 221], [11, 133], [12, 111], [13, 107], [14, 106]]
    }, {
  name: 'America',
  data: [[1, 18], [2, 31], [3, 54], [4, 156], [5, 339], [10, 339], [11, 156], [12, 54], [13, 31], [14, 18]]
}, {
  name: 'America 1',
  data: [[6, -818], [7, -1201], [8,  -1201], [9, -818]]
}]
});