This example demonstrates how to fixate d3-zoom on a point of interest: zooming using the wheel or touch is allowed, but panning is not. When a zoom event is emitted, the current transform is translated to put the focus point at the center of the viewport:
var point = transform.invert(center);
transform = transform.translate(point[0] - focus[0], point[1] - focus[1]);
Compare this to non-fixated zooming.
https://d3js.org/d3.v4.min.js