tickSize() is a D3 axis method that gets or sets the length of an axis’s tick marks. Extending ticks across the chart turns them into a grid. section 5.2.3
Create a horizontal grid
For a bottom axis, set the tick length to the negative inner chart height: bottomAxis.tickSize(innerHeight * -1). The ticks then extend upward behind the streamgraph. section 5.2.3
const bottomAxis = d3.axisBottom(xScale) .tickValues(d3.range(1975, 2020, 5)) .tickSizeOuter(0) .tickSize(innerHeight * -1);
This listing combines tickValues(), tickSizeOuter(), and tickSize() in a bottom-axis configuration. section 5.2.3
