Highcharts Demo
author(s):
Torstein Hønsi
by Hugo Carneiro
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: null
},
subtitle: {
text: null
},
xAxis: [
{
categories: [['Africa', 'America', 'Asia'], ['Asia', 'Europe', 'Oceania']],
reversed: false,
labels: {
step: 1
},
title: {
text: null
}
}, { // mirror axis on right side
opposite: false,
reversed: false,
categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'],
linkedTo: 0,
labels: {
step: 1
}
}
],
yAxis: {
min: 0,
title: {
text: 'Average cost (USD) per m2',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ' millions'
},
plotOptions: {
bar: {
dataLabels: {
enabled: false
}
}
},
credits: false,
legend: {
enabled: false
},
credits: {
enabled: false
},
series: [{
name: 'Africa',
data: [['asdasd', 107], ['asdasd', 33], ['asdasd', 635], ['asdasd', 203], ['asdasd', 2]]
}, {
name: 'Year 1900',
data: [133, 156, 947, 408, 6]
}, {
name: 'Year 2012',
data: [1052, 954, 4250, 740, 38]
}]
});