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

Legend items ordering, sorting #116

Open
bears4barrett opened this issue Jul 13, 2022 · 5 comments
Open

Legend items ordering, sorting #116

bears4barrett opened this issue Jul 13, 2022 · 5 comments

Comments

@bears4barrett
Copy link

bears4barrett commented Jul 13, 2022

Task: there should be parameters for legend ordering and sorting.

Legend and Geometry: Area charts work in reverse of each other as shown in the attached image.

Screen Shot 2022-07-13 at 11 26 15 AM

I attempted to remedy this with configurations (reverse, orientation, rotate, etc.), but none seemed to solve with desirable outcome. It would be nice if this directionality was corrected by default, or a configuration to reverse the order in the Y Axis.

@simzer simzer changed the title Legend / Area Charts in reverse directions Legend items ordering, sorting Jul 4, 2023
@btbritz
Copy link

btbritz commented Feb 16, 2024

Any fix or work around for this? @simzer

@simzer
Copy link
Member

simzer commented Feb 16, 2024

Hi, unfortunately, there is no fix yet. I have made a workaround, I hope it's applicable in your case:
https://jsfiddle.net/simzer/dkha2Lwm/21/

@schaumb
Copy link
Contributor

schaumb commented May 15, 2024

I rewrote the workaround because the legend-label-draw and legend-background-draw event arguments are changed in the main.
https://jsfiddle.net/vuhL74mw/39/

@simzer
Copy link
Member

simzer commented May 15, 2024

Great, thanks!

@schaumb
Copy link
Contributor

schaumb commented Nov 26, 2024

After the next release (probably 0.17.0) the sub-axis (y) will be got a new property: reverse: <bool>. With that setting the y-axis markers can be reordered.

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

No branches or pull requests

4 participants