Y axis zoom
hi, I have successfully added zoom along the x-axis( using this https://uber.github.io/react-vis/examples/charts/zoomable-chart )but i want to zoom along the y-axis as well. any suggestions on how to do that? thank you
Hey Jonny - this is certainly possible, but not with the current implementation. It would require more code to accomplish. Did you copy the highlight.js file into your codebase to use it, or did you import it some other way?
Regardless - there's some TODO's in the file that show some areas that require work to add y-axis zoom.
Ideally this would be part of the core code and not an example, but I haven't been able to migrate this yet.
I have some old code laying around where I modified the existing example.
Clicking on the x or y axis results in a zoom along the selected axis. Clicking inside the graph results in a zoom on both axis at the same time. The code is available here: https://codesandbox.io/s/3ql7o7lyr6.
Be careful for bugs, this was some of the first work I did in Javascript and react...
I extended the highlight example to zoom X and Y and fixed the offset. Take a look : #858
The new highlight component addresses this!