Zoom continuous Bar Chart
Hi there,
I'm using chart.zoom.js in an ionic application. Zooming and panning works great on line charts. Thanks for that! But now I need a bar chart that has no borders.
This works great until I zoom in. Zooming in creates space between the bars. Is there a way to keep the bars connected when zoomed in?
@blurry-code this would likely be hard to implement.
The best bet you would have is if categorySpace and barSpacing are set to 1.0 in your config. Without a fiddle or other test case I can't really speculate further
Sorry, this is my first jsfiddle and I cannot get the chart.zoom working. But here is a simplified version of my bar chart which I am trying to zoom in without gaps appearing in between the bars.
http://jsfiddle.net/blurry_code/k4du61x8/
In this fiddle http://jsfiddle.net/blurry_code/k1b2bnvo/ I tried to get the xAxis working with dates since this is closer to my actual use-case. But I cannot get it to work in jsfiddle (unlike in my app)

I think part of the problem is loading the files from GitHub which might not have the correct headers
Is there another way to load Zoom.Chart.JS in the fiddle?
this should do it https://npmcdn.com/Chart.Zoom.js
@blurry-code you need to replace the URLs for your external resources with URLs from https://cdnjs.com/ or http://rawgit.com/. If you're still having an issue, please post a fixed jsfiddle link and we will reopen this.
I didn't open this thread so I could to learn on how make a working fiddle - many thanks though for the help - but rather because I got a problem with zooming. This problem is still unsolved.
I updated the first fiddle (http://jsfiddle.net/blurry_code/k4du61x8/) so as you zoom in (scroll up with the mouse hovering above the chart) you will see that the bars are keeping their width and gaps appear inbetween the bars.
The desired behavior would be that the bars stay connected even when zooming in on them.
Thanks for the updated jsfiddle.
Hello! I have the same issue, where when you zoom in on a bar chart, the bars are not rendered as they would if that were the original zoom level. Consider this Codepen which is based off of the zoom-time sample. Click and drag to zoom in to see how the bars adversely maintain the original widths. I would expect it to resize, respecting the settings for widths, spacing, etc. in my config. This is the one thing holding me back from deploying this wonderful extension to my app! Thanks for all you do :)
The original issue does not happen with Chart.js v3 + zoom v1 (both beta) https://jsfiddle.net/p1jm86we/