d3.stackOffsetExpand normalizes every stack column so its series sum equals 1, or 100%. Use it when a stacked chart should compare relative composition rather than absolute totals. section 5.2.4
Because normalization changes the annotated stack values to the 0–1 range, configure the vertical scale with a domain from 0 to 1. section 5.2.4
Normalize a stacked bar chart
const stackGenerator = d3.stack() .keys(formatsInfo.map(f => f.id)) .order(d3.stackOrderDescending) .offset(d3.stackOffsetExpand); section 5.2.4
