Skip to content

[Feature Request] Allow ordering items by value for unified x hovermode #5362

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

Open
mayeut opened this issue Dec 26, 2020 · 9 comments
Open
Labels
feature something new P3 backlog

Comments

@mayeut
Copy link

mayeut commented Dec 26, 2020

At the moment, it seems that order of items is hardcoded in the following line:

legendOpts.entries.sort(function(a, b) { return a[0].trace.index - b[0].trace.index;});

It would be great to allow ordering items by value for unified x hovermode as mentioned in comments #4477 (comment) and #4477 (comment).

Current behavior sample:
Capture d’écran 2020-12-26 à 17 35 32

Desired behavior sample:
Capture d’écran 2020-12-26 à 17 32 42

@mayeut
Copy link
Author

mayeut commented Dec 26, 2020

Might mitigate #4786 in some cases (like the one showed above).

@miranda-luna-db
Copy link

Hi @nicolaskruchten @chriddyp @ndrezn - Any plans to take a look here soon? Right now we're stuck between a choice of (a) covering up the x-axis value on hover but having data nicely sorted and (b) displaying x-axis value but losing data sort.

@nicolaskruchten
Copy link
Contributor

It's not a bad idea, we could add a flag that would control this behaviour but no one on our team is looking at this at the moment, no. We'd accept a pull request for someone who wanted to implement it though!

@nlyle01
Copy link

nlyle01 commented Jan 9, 2023

Chiming in to agree with @mayeut; Ordering tooltip by trace value rather than legend order would be super cool

@vicn1222
Copy link

vicn1222 commented Dec 9, 2023

I am also looking for this feature and stumble on this thread. Has this been implemented yet? Thanks.

@JeromeC-B
Copy link

For me, with plotly js, in the plot config, with hovermode = "x", it works.

@gvwilson
Copy link
Contributor

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

@KacemKhaled
Copy link

plotly==5.24.1 the functionality is still not there
Can you please re-open this issue?

@gvwilson gvwilson reopened this Apr 9, 2025
@gvwilson gvwilson added feature something new P3 backlog labels Apr 9, 2025
@gvwilson
Copy link
Contributor

gvwilson commented Apr 9, 2025

@KacemKhaled reopened, but we have no plans to implement this - we'd be happy to prioritize review of a PR from the community. thanks - @gvwilson

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

No branches or pull requests

8 participants