plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

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

Open mayeut opened this issue 5 years ago • 9 comments

At the moment, it seems that order of items is hardcoded in the following line: https://github.com/plotly/plotly.js/blob/4ce0c8bff1d80c0d17a91233883f883696ad8836/src/components/fx/hover.js#L1043

It would be great to allow ordering items by value for unified x hovermode as mentioned in comments https://github.com/plotly/plotly.js/issues/4477#issuecomment-590945637 and https://github.com/plotly/plotly.js/issues/4477#issuecomment-590995134.

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 avatar Dec 26 '20 16:12 mayeut

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

mayeut avatar Dec 26 '20 16:12 mayeut

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.

miranda-luna-db avatar Nov 04 '21 18:11 miranda-luna-db

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!

nicolaskruchten avatar Nov 04 '21 20:11 nicolaskruchten

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

nlyle01 avatar Jan 09 '23 22:01 nlyle01

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

vicn1222 avatar Dec 09 '23 01:12 vicn1222

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

JeromeC-B avatar Jan 08 '24 17:01 JeromeC-B

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

gvwilson avatar Jul 12 '24 12:07 gvwilson