Bar graph: Making the graph zoomable on the y-axis

I am using D3.js bar graphs in my project and it is like there is a new bar for each passing day. The data may be going down a long way to 2015 or 2014 in many of the cases.

The range in such cases is immense starting from 0 to 80,000 a unit. This makes a very impressive graph.

I am already able to zoom in and zoom out my data on the x-axis making the graph very readable and good looking. However, let’s say we have a total of 9 values on the graph like this:

25000 - 1500 - 670 - 10 - 85 - 910 - 4600 - 19400 - 50000

In this case, the heights indicate a very big range, some bigger heights are readable while the smaller ones are very hard to view on the graph.

I wanted to make the y-axis to be controlled dynamically like making the graph zoomable on the y-axis.

I tried making the height dynamic but it just makes the graph big or small and does not gives the zooming effect.