zoom.translateBy(selection, x, y)
If selection is a selection, translates the current zoom transform of the selected elements by x and y, such that the new tx1 = tx0 + k × x and ty1 = ty0 + k × y. If selection is a transition, defines a “zoom” tween translating the current transform. This method is a convenience method for zoom.transform. The x and y translation amounts may be specified either as numbers or as functions that returns numbers. If a function, it is invoked for each selected element, being passed the current datum d
and index i
, with the this
context as the current DOM element.
Please login to continue.