Accepted answer

Thanks to @Mark, I realized that I was looking at the problem from the wrong perspective. It didn't come from d3 but from Typescript. The axisBottom variable is a function, and Typescript requires it to have a context when used as a callback. Binding this solves that problem, as in :".x")

More Query from same tag