Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenericGrid incorrectly handling the lack of values #22

Open
at055612 opened this issue Feb 8, 2017 · 0 comments
Open

GenericGrid incorrectly handling the lack of values #22

at055612 opened this issue Feb 8, 2017 · 0 comments
Labels

Comments

@at055612
Copy link
Member

at055612 commented Feb 8, 2017

In GenericGrid line 362 it is assigning an empty array to d.visibleValues if d.values is not present. It should probably not assign .visibleValues at all if .values is not present. I think most of the viz scripts do a test on .visibleValues so this should be ok, but needs to be checked.

        if (!d.hasOwnProperty("visibleValues")) {
            if (d.values) {
                //create a function to expose only the visible values
                d.visibleValues = function() {
                    return d.values.filter(function(d) {
                        //assume true if prop not present
                        return (
                            (!d.hasOwnProperty("isVisible") || d.isVisible) && 
                            (!d.hasOwnProperty("isZoomVisible") || d.isZoomVisible) 
                        );
                    });
                };
            } else {
                d.visibleValues = [];
            }
        }
@at055612 at055612 added the bug label Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant