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

Invalid categories supplied to VictoryAxis in 0.24.1 #837

Closed
kujon opened this issue Nov 14, 2017 · 0 comments · Fixed by FormidableLabs/victory-chart#549
Closed

Invalid categories supplied to VictoryAxis in 0.24.1 #837

kujon opened this issue Nov 14, 2017 · 0 comments · Fixed by FormidableLabs/victory-chart#549
Assignees
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior

Comments

@kujon
Copy link

kujon commented Nov 14, 2017

Consider the following snippet:

<VictoryChart>
    <VictoryGroup
        data={[
            {x: 0, y: 2},
            {x: 5, y: 5}
        ]}
    >
        <VictoryLine />
        <VictoryAxis dependentAxis />
        <VictoryAxis />
    </VictoryGroup>
</VictoryChart>

In Victory 0.24.1 this results in the following prop types error:

warning.js:33 Warning: Failed prop type: Invalid prop `categories` of type `object` supplied to `VictoryAxis`, expected an array.
    in VictoryAxis (created by App)
    in VictoryGroup (created by App)
    in svg (created by VictoryContainer)
    in div (created by VictoryContainer)
    in VictoryContainer
    in VictoryChart (created by App)
    in div (created by App)
    in App

VictoryAxis turns out to be getting an empty object as categories upon inspection.

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

Successfully merging a pull request may close this issue.

2 participants