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

[Enhancement]: Make pie chart legend respect sortFunction. #1493

Closed
danxcraig opened this issue Feb 12, 2023 · 1 comment
Closed

[Enhancement]: Make pie chart legend respect sortFunction. #1493

danxcraig opened this issue Feb 12, 2023 · 1 comment

Comments

@danxcraig
Copy link

danxcraig commented Feb 12, 2023

Summary

Request (Development)
Ensure that the Pie/Donut chart legend respects sortFunction order.

Background
PR1043 solved custom sorting order for Pie and Donut Charts, but did not account for altering the sort order of the Legend.

In the example below, the legend order does not respect the donut sort order.

const groupOrders = ['Amazing', 'Ok', 'Awful'];

pie: {
    sortFunction: (a: any, b: any) => {return groupOrders.indexOf(a.group) - groupOrders.indexOf(b.group)},
}

image

Justification

Having an inconsistent order is a confusing user experience, which affects overall Product Experience.

Desired UX and success metrics

The legend sort order matches the data sort order

"Must have" functionality

As above

Specific timeline issues / requests

No specific timeline

Available extra resources

If you can tell me where to look, I can play around and submit a PR.

@danxcraig
Copy link
Author

danxcraig commented Feb 12, 2023

🤦‍♂️ Never mind. I just discovered Legend > Order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant