Giter Site home page Giter Site logo

Animation with ipywidget about ipychart HOT 3 CLOSED

ColasDroin avatar ColasDroin commented on May 28, 2024 1
Animation with ipywidget

from ipychart.

Comments (3)

nicohlr avatar nicohlr commented on May 28, 2024 1

Hello @ColasDroin, thank you very much for you feedback :) I'll look into it as soon as I have some time. I would then see if the problem is easy to fix, in which case I would add a patch to the next release. If not, I'll amend the documentation. Either way, I’ll update this issue :)

from ipychart.

ColasDroin avatar ColasDroin commented on May 28, 2024 1

Many thanks! I just updated the code I posted above as I realised I left some undefined variables.

from ipychart.

nicohlr avatar nicohlr commented on May 28, 2024 1

Hello @ColasDroin, the last version of ipychart (0.3.2) should solve this issue :)

For your information, I advise you to use options = {"animation": {"duration": 0}} when updating the chart dynamically to avoid to see an animation at each update.

Please also be careful on how you update the chart : you have to create a new object at each update. The example below illustrate this point :

# This will not work
mychart.data['datasets'][0]['data'][1]["y"] = 1

# This will not work
chart_data = mychart.data
chart_data['datasets'][0]['data'][1]["y"] = 1

# This will work, as we created a new object that we pass to the chart
new_data = copy.deepcopy(mychart.data)
new_data['datasets'][0]['data'][1]["y"] = 1
mychart.data = new_data

Do not hesitate to raise a new issue if you find a bug.

from ipychart.

Related Issues (7)

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.