-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pan & zoom not working for x-axis #8
Comments
@Intelli32 can you post a fiddle? |
Sorry, I thought I would have time to add a fiddle but you replied so fast :) Updated my post |
Awesome, thanks. To get this working, I need to implement panning and zooming for the category scale. Right now only numerical scales are supported |
Ok, but I get the same result even if I change labels to [1, 2, 3, 4, 5, 6]. But maybe this was not what you meant with "numerical scale"? |
I meant using a linear, logarithmic, or time type of scale for the x axis. |
My intention was actually to use a time scale so I got it working with that now. Thanks for the quick response! |
👍 |
@etimberg I'm having a similar issue with panning using "time" scale x axis. I created a plunker here with an example. |
@etimberg Is sample I provided adequate? Were you able to reproduce? |
@beefo just had a look now. I think you need to include hammerjs to make this work |
Ah, yes, thank you @etimberg. Worked like a charm. |
Any new about this? |
@etimberg This was the initial codepen I had found however tried addressing the solutions mentioned across the issues in this GitHub page however I still could not get it to work. The bug/unwanted behaviour I find is that it appears that panning occurs on the opposite side of where the mouse pointer coordinates exist. Meaning if I place my cursor on the left-most side of the chart, it pans to the right-most side, whereas if I place my cursor on the right-most side of the chart, it pans to the left-most side of the chart. |
@Koshux I am seeing the same issue, and it seems to zoom in, to only show the graph region between two points. I was expecting it to work like panning in the y direction (which works great!). Did you ever find an answer to this problem? |
@RPHolloway I have not yet found a solution for it unfortunately. Further progress is impeded due to #73 . |
anyone find the solution for panning on the x-axis.? |
@RPHolloway @Koshux guys any thing you got for the category scale? any hack or idea ? |
Hi @adeel3612 I was having the same problem, take e a look at #109 |
Is this statement still true? |
Its been implemented years ago, closing. |
Hi, I am trying to get pan & zoom working but I am not able to do that on X-axis even though I have the following settings. The provided examples works fine and I am trying to mimic those.
pan: { enabled: true, mode: 'xy' limits: { max: 10, min: 0.5 } },
zoom: { enabled: true, mode: 'xy' limits: { max: 10, min: 0.5 } },
What are the common mistakes when this happens?
Fiddle: https://jsfiddle.net/jm1adysp/3/
The text was updated successfully, but these errors were encountered: