D3.js zoom.scaleExtent() Function
The zoom.scaleExtent() Function in D3.js is used to set the scale extends to the specified array of numbers [k0, k1]. The k0 is the minimum allowed scale factor and k1 is the maximum allowed scale factor
Parameters: This function accepts a single parameter as mentioned above and described below
- extent: This parameter can be defined as specified as a function which returns such an array.
Return Value: This function returns the zoom behaviour.
Below programs illustrate the zoom.scaleExtent() function in D3.js