Variwide stacked
by kzoon
HTML
<script src="https://code.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: 'variwide'
},
title: {
text: 'Labor and Other 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',
title: {
text: 'Column widths are proportional to GDP'
}
},
legend: {
enabled: true
},
plotOptions: {
variwide: {
stacking: 'normal',
dataLabels: {
enabled: true,
format: '€{point.y:.0f}'
},
tooltip: {
pointFormat: 'Costs: <b>€ {point.y}/h</b><br>' +
'GDP: <b>€ {point.z} million</b><br>'
},
//colorByPoint: true
}
},
series: [
{
name: 'Labor Costs',
data: [
['Norway', 50.2, 235504],
['Denmark', 42, 277339],
['Belgium', 39.2, 421611],
['Sweden', 38, 162057],
]
},
{
name: 'Other Costs',
data: [
['Norway', 16, 235504],
['Denmark', 12, 277339],
['Belgium', 40, 421611],
['Sweden', 20, 162057],
]
}
]
});