An example of a surplus/deficit filled line chart. It uses a mask to fill the colour of the area above and below the line.
This is part of a series of visualisations called My Visual Vocabulary which aims to recreate every visualisation in the FT's Visual Vocabulary from scratch using D3.
https://d3js.org/d3.v4.min.js