Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: 'Historic World Population by Region',
align: 'left'
},
subtitle: {
text: 'Source: <a ' +
'href="https://en.wikipedia.org/wiki/List_of_continents_and_continental_subregions_by_population"' +
'target="_blank">Wikipedia.org</a>',
align: 'left'
},
xAxis: {
categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'],
title: {
text: null
}
},
yAxis: {
min: 0,
title: {
text: 'Population (millions)',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ' millions'
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -40,
y: 80,
floating: true,
borderWidth: 1,
backgroundColor:
Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
shadow: true
},
credits: {
enabled: false
},
series: [{
name: 'Year 1990',
data: [631, 727, 3202, 721, 26]
}, {
name: 'Year 2000',
data: [814, 841, 3714, 726, 31]
}, {
name: 'Year 2010',
data: [1044, 944, 4170, 735, 40]
}, {
name: 'Year 2018',
data: [1276, 1007, 4561, 746, 42]
}]
});