Giter Site home page Giter Site logo

Comments (4)

rosco54 avatar rosco54 commented on June 14, 2024

Looking at this.

from apexcharts.js.

rosco54 avatar rosco54 commented on June 14, 2024

Why you're seeing this:

If you look closely when running these examples under earlier versions you can see that the same effect occurs but only between the new datapoint and the preceding datapoint. The same problem is there but on a smaller scale.

In order to fix several gradient fill issues that produced permanently visible discontinuities in both area and line fills, it was necessary to compute a single enclosing path for each contiguous segment of a series, rather than multiple paths that butt together (one for at each datapoint in the series). The underlying SVG requires this in order to work correctly. For complete series with no missing data this results in a single enclosing path that includes all datapoints, hence you see the whole chart being reanimated, not just the last datapoint.

One conventional approach to fix this (in code) IMO would be:

  1. the fill animation to be disabled after the initial rendering,
  2. the chart to be redrawn after the new datapoint is appended but in a window that is one datapoint wider than the visible grid ( the new data is initially off the grid),
  3. the chart is then scrolled right to left to bring the new datapoint into view,
  4. the oldest datapoint to then be dropped,
  5. repeat from (2).

from apexcharts.js.

jherman avatar jherman commented on June 14, 2024

Just an FYI for others that reach this. If you are in need of a quick fix, reverting back to v3.48.0 works.

See codepen here:
https://codepen.io/jh_codepen/pen/dyEppwg

from apexcharts.js.

rosco54 avatar rosco54 commented on June 14, 2024

from apexcharts.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.