Giter Site home page Giter Site logo

Comments (6)

cmaurer avatar cmaurer commented on September 25, 2024

At a glance, this looks good. Let me take a look. Thanks for the example.

Chris

from angularjs-nvd3-directives.

cmaurer avatar cmaurer commented on September 25, 2024

You need to add xFunction and yFunction to your controller.

NVD3 uses those functions to access the data in ltt.

$scope.xFunction = function(){
                return function(d) {
                    return d.key;
                };
            }
$scope.yFunction = function(){
                return function(d) {
                    return d.y;
                };
}

This should get you going. Let me know if you still have issues.

Thanks,
Chris

from angularjs-nvd3-directives.

cmaurer avatar cmaurer commented on September 25, 2024

I am going to close this issue since I believe it has to do with the missing scope functions. If this ends up not being the problem, please create a new issue.

Thanks,
Chris

from angularjs-nvd3-directives.

MathRobin avatar MathRobin commented on September 25, 2024

It was that. Thank you :)

from angularjs-nvd3-directives.

dagumak avatar dagumak commented on September 25, 2024

Thanks! I didn't realize it was going to behave that way. I thought it would have a fallback if the function was missing. Perhaps console.warn?

from angularjs-nvd3-directives.

cmaurer avatar cmaurer commented on September 25, 2024

@dagumak

The fallback is the format that nvd3 expects. The scope functions are there to tell nvd3 to look for the data another way. This probably could have / should have been more descriptive about that. I am not sure it would make sense to console.warn on the default behavior.

The doc's should be more clear about this as well. It might be helpful to put the 'default' data format that nvd3 expects.

Chris

from angularjs-nvd3-directives.

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.