leg = ({
title: "Total migrant stock at mid-year",
subtitle: "by subregions in 2019 (in thousands)",
labels: [
"People who left this region",
"People who have moved to this region"
],
txtcol: "#585c59",
cols: [coltop, colbottom],
pos: [30, 330],
top: [d3.min(data, d => d.from), 7500, d3.max(data, d => d.from)],
bottom: [d3.min(data, d => d.to), 15000, d3.max(data, d => d.to)]
})