GithubHelp home page GithubHelp logo

Comments (3)

maxklenk avatar maxklenk commented on August 18, 2024

Hey @owaaa,
thanks for reporting. I have not experienced this issue yet, what are you passing in tho the dataset variable? A $promise?

Perhaps the simple use of if (!scope.dataset) {} isn't the best to determine if the dataset key is present in the scope.

from angular-chart.

owaaa avatar owaaa commented on August 18, 2024

I think the problem is the scope promise is from another directive vs a controller which already exists. Angular builds and links children first so the chart directive is post_linked before the link is called in my directive. Therefore nothing exists in dataset the first time its called. Normally this isn't an issue with other directives as when you compile the binding {{}} or use a watch angular will populate it when the parent has the data and everything works. I was tempted to fork and just remove the throw and let it continue to set up the watchers.

I just found a workaround where if I set an ng-if on the chart and wait for the dataset it works.

I have hence hit a second issue. I need to cap the y-axis to a max, but it doesn't seem to be respecting that option? I also can't seem to find a way to set a tick interval on the x/y axes?

from angular-chart.

maxklenk avatar maxklenk commented on August 18, 2024

I tried my best to handle all kind of promises and late assignment in the new release. Please try if it works like expected.

Furthermore setting ranges for the axes can be accomplished using the same api c3 provides, have a look a this grafiddle to see a working example.

from angular-chart.

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.