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

sortKey param doesn't reorder bars on a horizontal bar chart, only labels #1082

Closed
4 tasks done
ryangiglio opened this issue Aug 6, 2018 · 6 comments · Fixed by #1104
Closed
4 tasks done

sortKey param doesn't reorder bars on a horizontal bar chart, only labels #1082

ryangiglio opened this issue Aug 6, 2018 · 6 comments · Fixed by #1104
Assignees
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior

Comments

@ryangiglio
Copy link

Bugs and Questions

Checklist

  • This is not a victory-native specific issue. (Issues that only appear in victory-native should be opened here)

  • I have read through the FAQ and Guides before asking a question

  • I am using the latest version of Victory

  • I've searched open issues to make sure I'm not opening a duplicate issue

The Problem

I want to display the bars in my chart in a specific order, so I added a sort key to the data source and passed the sortKey="sort" param to my VictoryBar component. This works as expected in the default vertical bar graph.

When I add the horizontal={true} param to the VictoryBar component, the sorting breaks. The labels on the independent axis are re-ordered correctly, but the bars stay in the same order no matter what.

Reproduction

https://codesandbox.io/s/6y3zno0m7k

Note: Sizing/spacing doesn't affect the issue, it's just so the graphs are easier to see. The only difference between the vertical graphs and horizontal graphs is the horizontal={true} parameter.

@boygirl
Copy link
Contributor

boygirl commented Aug 6, 2018

@ryangiglio thank you for the helpful reproduction. I'll try to get this fixed for next week's release

@boygirl boygirl added the Type: Bug 🐛 Oh no! A bug or unintentional behavior label Aug 6, 2018
@boygirl boygirl self-assigned this Aug 6, 2018
@ryangiglio
Copy link
Author

Any update on when this will be fixed?

@boygirl
Copy link
Contributor

boygirl commented Aug 20, 2018

@ryangiglio sorry this got pushed back. I will get it out this week

@ryangiglio
Copy link
Author

No problem I appreciate that you're looking at it!

@boygirl
Copy link
Contributor

boygirl commented Aug 29, 2018

@ryangiglio thank you for your patience. This work will be released on Friday :)

@boygirl
Copy link
Contributor

boygirl commented Aug 30, 2018

This fix was released in victory@30.3.1

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