Git Product home page Git Product logo

Comments (6)

aviks avatar aviks commented on June 20, 2024

The width call on an html element fails if the elements of the page have not been injected with jquery (since width is not a DOM function, but a jquery one)

So I've seen this happen on a desktop browser when jquery is loaded after angular-js. I haven't used ionic, but you should look for a similar reason. Maybe the way ionic loads jquery has changed?

from angular-charts.

afontang avatar afontang commented on June 20, 2024

Hi Aviks

I just changed the jquery loading position before angular-js and there is a new error:

TypeError: undefined is not a function
at init (http://localhost/MP2JSMobile/Ionic2/lib/js/angular-charts.js:55:9) in this code:

    var chartFunc = getChartFunction(chartType);
 -->   chartFunc();

Thanks.

Andrés

from angular-charts.

aviks avatar aviks commented on June 20, 2024

I've seen this happen when your chartType value is incorrect. The set of allowed chartType values are line, pie, bar,area and point.

Note that the ac-chart attribute must specify the model value that contains the chart type, and not specify the chart type directly.

So DO NOT do this ac-chart='line'

Rather do this:
ac-chart='chartType'
and in your controller,
$scope.chartType='line'

Hope this helps.

from angular-charts.

afontang avatar afontang commented on June 20, 2024

Yes!. You are right.

Thanks.

Regards,

Andrés

from angular-charts.

chinmaymk avatar chinmaymk commented on June 20, 2024

Just to add some more info, here's a similar issue with plunkr - #8. Closing this one.

from angular-charts.

zhendong590 avatar zhendong590 commented on June 20, 2024

thanks a lot!

from angular-charts.

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.