Migration by age group
Up to 31 December of each year, 2011 - 2021
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<figure class="highcharts-figure">
<div id="container"></div>
<p class="highcharts-description">
</p>
</figure>
CSS
#container {
height: 570px;
}
.highcharts-figure, .highcharts-data-table table {
min-width: 310px;
max-width: 1250px;
margin: 1em auto;
}
.highcharts-data-table table {
font-family: Verdana, sans-serif;
border-collapse: collapse;
border: 1px solid #EBEBEB;
margin: 10px auto;
text-align: center;
width: 100%;
max-width: 500px;
}
.highcharts-data-table caption {
padding: 1em 0;
font-size: 1.2em;
color: #555;
}
.highcharts-data-table th {
font-weight: 600;
padding: 0.5em;
}
.highcharts-data-table td, .highcharts-data-table th, .highcharts-data-table caption {
padding: 0.5em;
}
.highcharts-data-table thead tr, .highcharts-data-table tr:nth-child(even) {
background: #f8f8f8;
}
.highcharts-data-table tr:hover {
background: #f1f7ff;
}
JavaScript
Highcharts.chart('container', {
chart: {
type: 'line'
},
exporting: {
sourceWidth: 1200,
sourceHeight: 600,
allowHTML: true
},
title: {
text: 'Migration by age group 2011 - 2021'
},
subtitle: {
text: 'Up to 31 December of each year'
},
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom',
borderWidth: 1,
backgroundColor:
Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF'
},
xAxis: {
title: {
text: 'Year'
},
categories: [
2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021
]
},
yAxis: {
title: {
text: ' '
},
tickAmount: 13
},
tooltip: {
shared: true
//,valueSuffix: ' units'
},
credits: {
enabled: false
},
plotOptions: {
series: {
marker: {
radius: 2.5
},
groupPadding: 10.2,
dataLabels: {
enabled: true,
style: {
fontSize: '11px',
fontWeight: 'bold'
},
allowOverlap: true
}
}
},
series: [{
name: 'Migration 0-59',
color: 'rgba(29, 40, 189, .7)',
data: [289776,376814,435916,557579,1140037,512160,427404,411126,344921,null,null],
dataLabels: {
color: 'rgba(29, 40, 189, .7)',
verticalAlign: 'top'
}
}, {
name: 'Migration 0-59 - predicted',
color: 'rgba(29, 40, 189, .7)',
data: [null,null,null,null,null,null,null,null,344921,289776,289776],
dashStyle: 'shortdot',
dataLabels: {
color: 'rgba(29, 40, 189, .7)',
verticalAlign: 'top'
}
}, {
name: 'Migration 60-79',
color: 'rgba(0, 110, 0, .7)',
data: [-8897,-6268,-5568,-5205,993,-9650,-7695,-8824,-13715,null,null],
...