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

VictoryArea -- Cannot read property 'left' of underfined #517

Closed
vnu opened this issue Mar 14, 2017 · 7 comments
Closed

VictoryArea -- Cannot read property 'left' of underfined #517

vnu opened this issue Mar 14, 2017 · 7 comments
Assignees
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior

Comments

@vnu
Copy link

vnu commented Mar 14, 2017

I am trying victory for the first time and my code is pretty straightforward and I keep running into the left of undefined error. The error, however doesn't occur for VictoryBar or VictoryPie.

return (
            <div className="row">
                <VictoryArea/>
            </div>
        );

The console error

Uncaught TypeError: Cannot read property 'left' of undefined
    at totalPadding (clip-path.js:72)
    at ClipPath.calculateAttributes (clip-path.js:76)
    at ClipPath.shouldComponentUpdate (clip-path.js:49)
    at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:464)
    at ReactCompositeComponentWrapper.wrapper [as updateComponent] (ReactPerf.js:66)
    at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:405)
    at Object.receiveComponent (ReactReconciler.js:87)
    at Object.updateChildren (ReactChildReconciler.js:84)
    at ReactDOMComponent._reconcilerUpdateChildren (ReactMultiChild.js:216)
    at ReactDOMComponent._updateChildren (ReactMultiChild.js:351)
@boygirl
Copy link
Contributor

boygirl commented Mar 14, 2017

@vnu can you provide a little more detail. I tried to reproduce your issue, https://jsfiddle.net/boygirl/ehkyzdew/, but I'm not seeing your error.

@vnu
Copy link
Author

vnu commented Mar 15, 2017

@boygirl What kind of details would help you? I was able to see the graph in the js fiddle as well. I'm not sure why this is not working with my existing code and what is different between Area / Bar / Pie that Bar and Pie works but Area doesn't :/

@boygirl
Copy link
Contributor

boygirl commented Mar 15, 2017

What version of Victory are you on? Are you rendering VictoryArea with any props? The only thing I can think of that is different between VictoryArea and those other components is that VictoryArea renders inside a container that uses clipPath by default so that it can animate correctly. You can check and see whether that is the problem if you add the prop groupComponent={<g/>} to your VictoryArea component and seeing if that fixes the issue.

@sisiguo
Copy link

sisiguo commented Mar 15, 2017

I am having the same error (but with VictoryLine and it occurs for me in the jsfiddle link posted above as well when I open up the inspector:
screen shot 2017-03-15 at 3 48 50 pm

@boygirl
Copy link
Contributor

boygirl commented Mar 15, 2017

@vnu looks like the issue is in [email protected] I'll get this fixed

@boygirl boygirl added the Type: Bug 🐛 Oh no! A bug or unintentional behavior label Mar 16, 2017
@boygirl boygirl self-assigned this Mar 16, 2017
@boygirl
Copy link
Contributor

boygirl commented Mar 16, 2017

Fixed in [email protected]

@boygirl boygirl closed this as completed Mar 16, 2017
@vnu
Copy link
Author

vnu commented Mar 21, 2017

Thanks @boygirl for fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior
Projects
None yet
Development

No branches or pull requests

3 participants