Chartjs zoom not working

GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. The provided examples works fine and I am trying to mimic those. What are the common mistakes when this happens? Intelli32 can you post a fiddle? 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"? My intention was actually to use a time scale so I got it working with that now. Thanks for the quick response! I created a plunker here with an example. Were you able to reproduce?

I think you need to include hammerjs to make this work.

chartjs zoom not working

Ah, yes, thank you etimberg. Worked like a charm. 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. 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! RPHolloway I have not yet found a solution for it unfortunately.GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.

Have a question about this project?

chartjs zoom not working

Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. I have included: Script. Require "ChartJS" ; Script.

chartjs zoom not working

Thanks to anyone who can help, I would just like basic horizontal panning, XY panning would just be a bonus :. Zoom and pan both not working for me. This could be because your scales are not both linear. Support for other scale types is buggy in these plugins. We use optional third-party analytics cookies to understand how you use GitHub.

Learn more. You can always update your selection by clicking Cookie Preferences at the bottom of the page. For more information, see our Privacy Statement.

We use essential cookies to perform essential website functions, e. We use analytics cookies to understand how you use our websites so we can make them better, e. Skip to content. Dismiss Join GitHub today GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Sign up. New issue. Jump to bottom. Pan is not working for Bar Chart, Zoom is however. Labels bug help wanted. Copy link Quote reply.

chartjs-plugin-zoom

My barchart uses the chartjs-zoom plugin, however only the zoom functionality works. Same here, the pan doesn't work neither on codepen. Do I need to include hammerjs as well? The issue with pan not working persists with Chart. Pan is not working GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account. Hi I am using this plugin with Chart js, i have manged to pan on my graph but for some reason i can not zoom into the graph. I am using a Line Chart. I too am having issues with the zoom functionality. Can't even seem to get the sample zoom. Not sure if it is the same for you, but I get a lot of error after updating chartjs to v2.

So I had to downgrade chartjs to v2. TyrelCB to the extent that you can simplify the example, it will improve the odds that someone has time to figure out what's wrong. Me too I have the same problem and I managed to resolve it by switching back to version 0.

So using npm run : npm install --save chartjs-plugin-zoom 0. TyrelCB I guess that zoom doesn't work well on category scales. Since you display timeseries data, you could use a time scale. IDrissAitHafid Can you post an example? My own examples are working, so I guess the bug depends on your chart data or options. Any Idea as to why this doesn't work with category scales? We use optional third-party analytics cookies to understand how you use GitHub.

Learn more. You can always update your selection by clicking Cookie Preferences at the bottom of the page. For more information, see our Privacy Statement. We use essential cookies to perform essential website functions, e. We use analytics cookies to understand how you use our websites so we can make them better, e.

Subscribe to RSS

Skip to content. Dismiss Join GitHub today GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Sign up. New issue. Jump to bottom. Copy link Quote reply. I am also using the most recent version of the plugin and chart js. Has anyone experienced the same issue? Django : chartjs-plugin-zoom not working Sign up for free to join this conversation on GitHub.

Already have an account?Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. We use optional third-party analytics cookies to understand how you use GitHub. Learn more. You can always update your selection by clicking Cookie Preferences at the bottom of the page.

For more information, see our Privacy Statement. We use essential cookies to perform essential website functions, e. We use analytics cookies to understand how you use our websites so we can make them better, e. Skip to content. Labels 10 Milestones 0. Labels 10 Milestones 0 New issue. When round is set, I can not pan the graph to the right. Not working when a time adapter is used opened Sep 28, by RobCzikkel. Plugin ignores option changes of pan.

Panning through scrollbar opened Sep 16, by anubhavng. Do not register plugin globally when using module import opened Aug 13, by qnp. Compatibility with Chart js 3.

Zoom drag and pan together opened Jun 28, by OrenMe. Many issues with zoom opened Jun 26, by dexion.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. When round is set, I can not pan the graph to the right. I created a graph with the following code. I can pan the graph to the left, but not to the right.

If I don't set round, I can pan it to the right. Learn more. Why doesn't pan in chartjs-plugin-zoom work? Ask Question. Asked 2 days ago. Active 2 days ago. Viewed 15 times. Why is that? Manoj 5 5 silver badges 18 18 bronze badges. Nemurino-kai Nemurino-kai 1 1 1 bronze badge.

New contributor. Active Oldest Votes. Nemurino-kai is a new contributor. Be nice, and check out our Code of Conduct. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Ben answers his first question on Stack Overflow.

The Overflow Bugs vs. Featured on Meta.Panning can be done via the mouse or with a finger. Zooming is done via the mouse wheel or via a pinch gesture. Hammer JS is used for gesture recognition. Live Codepen Demo. To configure the zoom and pan plugin, you can simply add new config options to your chart config. Programmatically resets the zoom to the default state. Prior to v0. Old versions are still available on npm under that name.

You can find documentation for Chart. Examples for this plugin are available in the samples folder. Before submitting an issue or a pull request to the project, please take a moment to look over the contributing guidelines first. Toggle navigation RecordNotFound. Want to take your software engineering career to the next level? Statistics on Chart. Leave a review! View open issues 43 View Chart. Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.

Evaluating Chart. Score Explanation. Commits Score?

ChartJS Zoom and Pan In React Hooks

Currently requires Chart. Live Codepen Demo Configuration To configure the zoom and pan plugin, you can simply add new config options to your chart config. To-do Items The following features still need to be done: Pan limits.

We should be able to set limits for all axes or for a single axis, identified by ID, that are the maximum and minimum values, in data values, that can be panned to. Zoom limits.

Similar to pan limits but for zooming Panning of category scales the ones that use strings as labels Zooming of category scales the ones that use strings as labels Installation To download a zip, go to the chartjs-plugin-zoom.

Documentation You can find documentation for Chart. Contributing Before submitting an issue or a pull request to the project, please take a moment to look over the contributing guidelines first.

License chartjs-plugin-zoom. Show More. More projects by chartjs View all. Commit Score: This score is calculated by counting number of weeks with non-zero commits in the last 1 year period.

No spam, ever! We will send you weekly update emails. Close Submit. For the benefit of fellow developers, don't leave out any detail!Kathy, United States Iceland Grand Tour, August 2014 You are so well organized and thorough.

Andrea, Canada Scenic Fjords of Norway, August 2014 Everything was wonderful and went off without a hitch. Thank-you for a great trip.

Charles, United States Scenic Circle of Scandinavia, August 2014 We were very pleased with all aspects of our trip. Arthur, United States Highlights of Scandinavia by car, August 2014 We just had an incredible 24 day self-drive tour around beautiful Scandinavia. Irja was our travel consultant who did a highly commendable job in making us feel at home in a different country. The tour was perfectly planned with top Hotels(Clarion chain),maps cell phone Europcar ,and vouchers for hotels and any pre-booked tours.

Anybody wanting to visit Sweden has to use Nordic Visitor as they are very knowledgeable and friendly to do business with. Words are unable to do justice to the warmth we received while touring Sweden ,with many good memories and photos. Robin, United States Iceland Complete, July 2014 We wanted to tour Iceland on our own, but knew nothing about where to stay, what to see or how long it might take to drive ourselves from place to place.

Art S, United States The Golden Triangle of Scandinavia, July 2014 We just returned from an awesome nine day trip with visits to Stockholm, Copenhagen and Oslo. Sanjeev, India Four Corners of Iceland, July 2014 This review comes a little late but then better late than never.

David, United Kingdom Majestic Highlights of Norway, July 2014 I was very pleased with the whole experience. William and Marilyn, United States Iceland Grand Tour, July 2014 The map provided to us highlighting the route and where the hotels were located, as well as attractions, was extremely helpful.

Robin, United States Iceland Complete, July 2014 We asked Alexandra to try to get us the best rooms possible that were also quiet, if possible. Fahad, Kuwait Iceland Complete, June 2014 It was a thoroughly-planned trip from A to Z with many options to select from and add to the trip depending on the location.

Elizabeth, United States Pearls of the South and West, June 2014 Our hotels were perfect. Wayne, United Kingdom Pearls of North Iceland, June 2014 All aspects of the trip exceeded my expectations and the service from first contact to arriving home was excellent. Neva, Canada Scenic Fjords of Norway, June 2014 The location of hotels so close to trains was excellent.

Karen, Australia Highlights of Scandinavia by car, June 2014 Excellent assistance and communication from Jennie and wonderful accomodation. Chris, United States The Classic Scandinavian Roundtrip, June 2014 I travelled with family to Denmark, Norway and Sweden this month and had a fantastic time, thanks in large part to the excellent job that Nordic Visitor did in coordinating my trip.

chartjs zoom not working

Donald, Canada Iceland Full Circle, June 2014 My wife and I took the Iceland Full Circle self-drive tour in early June. Bradley, Canada Romance Around Iceland, May 2014 Our first time in Iceland and the staff at Nordic Visitor made the whole experience so easy and hassle free.

Cyndi, United States Iceland Complete, May 2014 I had done enough research to be dangerous and overwhelmed. Kimberly, United States South Iceland at Leisure - Winter, April 2014 We had a wonderful time. Graham and Sylvia, Canada The Golden Triangle of Scandinavia, April 2014 We felt that every aspect of our contact with you was professional and excellent and are very pleased we chose to book through you.

Colin, United Kingdom Winter Romance, March 2014 We had an excellent holiday although it was a shame that we didn't see the Northern lights. Iskandar, Malaysia Iceland Full Circle - Winter, March 2014 Beautiful country accommodations. Bill, United States Northern Lights City Break, February 2014 I travel alone throughout the world. Laura, Canada Golden Triangle - Starting in Copenhagen, February 2014 Cecilia Markov (the person I was working with predominantly at your company) is AMAZING.

Young0419, United Kingdom Northern Lights City Break, January 2014 Even though, I couldn't see any northern lights, it was a good experience to visit Iceland. The "Norway in a Nutshell" has provided me a good perspective of Norway.


thought on “Chartjs zoom not working”

Leave a Reply

Your email address will not be published. Required fields are marked *