GithubHelp home page GithubHelp logo

Comments (3)

crookm avatar crookm commented on June 10, 2024

I had this problem, but I saw that the pizza playground page initialized the script like this:

setTimeout(function () {
    Pizza.init();
    $(document).foundation();
    $(window).trigger('resize');
}, 300);

Seems to work fine for me now. Would have saved me a lot of time if this was in the docs.

from pizza.

efecher avatar efecher commented on June 10, 2024

adding this code does work, however the chart show up cut off a bit. I still need to make multiple calls to Pizza.init() or $(window).trigger('resize'); to get the chart to grow enough so nothing's cut off.

from pizza.

crookm avatar crookm commented on June 10, 2024

Could that be because of other elements being initialised or animated before the charts? Try it on a empty page and see what you get. Also maybe try with a longer delay (maybe change 300 to 600ms?)

Although side note, I wouldn't recommend this library. After managing to get it working fine myself, I found that the axis of graphs aren't ever accurate. I switched to Chart.js - you'll find it's a nice alternative, it works fine on responsive websites.

from pizza.

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.