Coder Social home page Coder Social logo

Comments (7)

samkristoff avatar samkristoff commented on August 22, 2024

I added a 'refresh' button so I can re-load a data set without panning/zooming the chart and make sure I'm loading the same data each time.

Clicking the refresh button does not throw the error above if I keep the cursor outside the chart. However if I click the refresh button and move my cursor around over the chart the error is thrown.

I save a reference to each series in a map (this.series) the first time I add it to the chart and then update the data with

this.series[seriesName].data.setAll(newData);

from amcharts5.

zeroin avatar zeroin commented on August 22, 2024

It would be best if you could create a codepen where this issue is reproduced, it would help to figure out the problem - thanks!

from amcharts5.

samkristoff avatar samkristoff commented on August 22, 2024

I was able to reproduce this in JSFiddle using a setTimeout to mock the API call.
https://jsfiddle.net/samkristofftulu/qwrgx7mv/65/

Here is a video demonstrating the issue.
https://share.vidyard.com/watch/LJo4navHWFRv1XU2gsRYsN?

In this example the error is only thrown once per refresh, but when the time range of the data changes or there are multiple series it gets worse and will quickly lock up the chart. I'm working on an example the reproduces that.

from amcharts5.

zeroin avatar zeroin commented on August 22, 2024

I confirm the bug - we fixed it internally and the issue will be solved with next release. Thanks a lot for helping to find it.

from amcharts5.

samkristoff avatar samkristoff commented on August 22, 2024

Hey zerio, I'm happy to help.

EDIT: Answering my own question below - I disabled the cursor before loading new data and enabled after the load is complete. This prevents the error above and prevents the charts from locking up.

Is there a work around or patch I can try to see if this also prevents my charts from locking up (not sure if this is just a red herring).

Thanks!

from amcharts5.

martynasma avatar martynasma commented on August 22, 2024

BTW, we'll let you know here when the version with a fix is available.

from amcharts5.

martynasma avatar martynasma commented on August 22, 2024

Fixed in 5.0.1.

[5.0.1] - 2021-11-05

Fixed

  • XYChart with panning enabled an no Animated theme was flickering while panning.
  • JS error could occur sometimes if data was updated while cursor was moving over the chart.

Full change log.

Download options.

Make sure you clear your browser cache after upgrading. And feel free to contact us again if you are still experiencing this issue.

from amcharts5.

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.