A zero baseline is the chart reference level representing the numeric value zero. In stacked charts, the offset setting controls whether shapes sit above it or distribute around it. section 5.2.4
Use the stack offset to control the chart’s relationship with zero:
- d3.stackOffsetNone is the default and places all shapes above the zero baseline. section 5.2.4
- Other offsets distribute shapes above and below the baseline, supporting diverging or centered visual arrangements. section 5.2.4
Figure 5.20 D3 allows controlling how the shapes are positioned in regard to the baseline with the offset() accessor function. Here we see examples with stacked areas and stacked bars.
Compare stacked areas and bars positioned above, below, or around their baseline. section 5.2.4
