Code Monkey home page Code Monkey logo

Comments (10)

etimberg avatar etimberg commented on May 18, 2024

@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

from chartjs-plugin-zoom.

blurry-code avatar blurry-code commented on May 18, 2024

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)

blue

from chartjs-plugin-zoom.

etimberg avatar etimberg commented on May 18, 2024

I think part of the problem is loading the files from GitHub which might not have the correct headers

from chartjs-plugin-zoom.

blurry-code avatar blurry-code commented on May 18, 2024

Is there another way to load Zoom.Chart.JS in the fiddle?

from chartjs-plugin-zoom.

etimberg avatar etimberg commented on May 18, 2024

this should do it https://npmcdn.com/Chart.Zoom.js

from chartjs-plugin-zoom.

compwright avatar compwright commented on May 18, 2024

@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.

from chartjs-plugin-zoom.

blurry-code avatar blurry-code commented on May 18, 2024

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.

from chartjs-plugin-zoom.

compwright avatar compwright commented on May 18, 2024

Thanks for the updated jsfiddle.

from chartjs-plugin-zoom.

MusikAnimal avatar MusikAnimal commented on May 18, 2024

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 :)

from chartjs-plugin-zoom.

kurkle avatar kurkle commented on May 18, 2024

The original issue does not happen with Chart.js v3 + zoom v1 (both beta)
https://jsfiddle.net/p1jm86we/

from chartjs-plugin-zoom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.