With zoom.x() and zoom.y() removed, there doesn't appear to be an elegant way to zoom a single axis while leaving the opposite axis's domain untouched.
I'd like to propose the idea of extending the transform methods to support 1 or 2 scales, replacing the single k value with kx and ky values and extending the transform.scale method to accept an optional second parameter. By default, when called with a single parameter, kx and ky would be assigned with the same scale, resulting in the same functionality as today. However, users would have more control over their transforms through the added ability to compress and expand axises as needed.
I'm happy to work on this functionality but wanted to get a feel for it's perceived viability before I dove in.
Please re-open this issue and provide an API for it via a .scaleFactor as shown in https://github.com/wiremind/d3-xyzoom, f.ex. 5-years later this is still a perfect common problem that needs addressing.
With
zoom.x()
andzoom.y()
removed, there doesn't appear to be an elegant way to zoom a single axis while leaving the opposite axis's domain untouched.I'd like to propose the idea of extending the
transform
methods to support 1 or 2 scales, replacing the singlek
value withkx
andky
values and extending thetransform.scale
method to accept an optional second parameter. By default, when called with a single parameter,kx
andky
would be assigned with the same scale, resulting in the same functionality as today. However, users would have more control over their transforms through the added ability to compress and expand axises as needed.I'm happy to work on this functionality but wanted to get a feel for it's perceived viability before I dove in.