GithubHelp home page GithubHelp logo

Comments (11)

LeeLenaleee avatar LeeLenaleee commented on May 18, 2024 2

Yeah its a bug fix so that would sound good to me

from chart.js.

etimberg avatar etimberg commented on May 18, 2024 1

Interesting, this only happens if the min is set on the axis 🤔

@stockiNail I'm guessing this is somehow related to https://github.com/chartjs/Chart.js/pull/11377/files

from chart.js.

stockiNail avatar stockiNail commented on May 18, 2024 1

@etimberg @StephanTLavavej I'll have a look.

EDIT: The issue is related to line.element draw where start and count are related to total amount of points and not the subset.

from chart.js.

stockiNail avatar stockiNail commented on May 18, 2024 1

@etimberg @LeeLenaleee PR #11432

from chart.js.

StephanTLavavej avatar StephanTLavavej commented on May 18, 2024

If it makes the investigation easier, I've simplified the repro to a plain linear axis, instead of needing a time axis. The new repro: https://codepen.io/StephanTLavavej/pen/QWJzqWg

from chart.js.

ErikDorstel avatar ErikDorstel commented on May 18, 2024

Based on "https://codepen.io/StephanTLavavej/pen/QWJzqWg" the line is not displayed when:

(xmin>4) && (x<(xmin*2)-4)

from chart.js.

stockiNail avatar stockiNail commented on May 18, 2024

@etimberg @StephanTLavavej @ErikDorstel I have seen where the issue is. To fix #11273 the line dataset element is fill with only the points to show to calculate correctly the control points.
Unfortunately the draw method (but also others to calculate the paths and segments) are invoked passing the start index of the points which is related to the whole amount of points, instead the points in the line element are always starting from.
I need a bit of time to find out the best fix to solve both issues.

from chart.js.

elinake avatar elinake commented on May 18, 2024

I have same issue: https://stackblitz.com/edit/stackblitz-starters-ngv2t8?file=src%2Fapp%2Fapp.component.ts

Bug happens with both wheel and drag and on all axis modes. I have linear scales and no limits. Downgrading to Chartjs 4.3.0 fixed it.

I also noticed that same issue happens in chartjs-plugin-zoom Click-to-zoom sample (only sample with linear scale): https://www.chartjs.org/chartjs-plugin-zoom/latest/samples/wheel/click-zoom.html, even though it says be using 4.2.1.

from chart.js.

etimberg avatar etimberg commented on May 18, 2024

@elinake thanks! Under the hood the zoom plugin changes the scale limits to do the zooming so I could see it breaking once a zoom starts

from chart.js.

stockiNail avatar stockiNail commented on May 18, 2024

@etimberg I think the best thing could be to revert the previous PR to solve this issue. Tee other issue (no blocking) needs more investigation, in my opinion. What do you think? if agree, I'll prepare the PR.

from chart.js.

etimberg avatar etimberg commented on May 18, 2024

Sure, lets revert the PR. @LeeLenaleee what do you think about making that into a v4.3.3?

from chart.js.

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.