This is largely based on Mike Bostock's Stacked-to-Multiples gist. I have added 4 snippets to the original code in order to represent the magnitudes of each group per quarter and also each quarter's total. I find totalling the values as they are stacked to be an efficient and intuitive way to marry visual movement with enhanced information display.
forked from fernoftheandes's block: Stacked-to-Multiples (improved)
https://d3js.org/d3.v3.min.js