Uh oh!
There was an error while loading. Please reload this page.
unified hover label - #4620
Conversation
otherwise console logs errors for mock "box-alignment-offset"
archmoj
commented
Mar 10, 2020
Great PR! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Very cool! @antoinerg have you tested We may not need to handle unified hover labels + MathJax for the first iteration, but it would be nice to confirm |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| var layer; | ||
| if(!fullLayout._infolayer || !gd.calcdata) return; | ||
| // Check whether this is the main legend (ie. called without any opts) |
There was a problem hiding this comment.
This is little hacky.
What if we pass proper options to draw legend.
In that case one may look into opts._main to figure out the mocked legend (for unified hover) from the actual legend.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
archmoj
commented
Mar 10, 2020
Hover is not showing up on this mock | possibly related to not having enough space? |
antoinerg
commented
Mar 10, 2020
@etpinard I just tested it and you were right that |
etpinard
commented
Mar 10, 2020
That's good.
I agree 100% cc #3841 |
…pported without this fix, in mock "ohlc_first", the library tries to render MathJax and the result is broken
This is addressed in ec8c373 which is a big improvement. The second, third and fourth mocks in https://codepen.io/antoinerg/pen/MWwpPpa are now much better. |
archmoj
commented
Mar 10, 2020
Wow! Hover on those mocks look very nice. Here is the updated demo. |
alexcjohnson
commented
Mar 13, 2020
Just watching @nicolaskruchten demo this and saying "I have to reload because there’s no button for unified hover" - makes me think perhaps unified vs separate hover should be a new layout attribute ( |
| editType: 'modebar', | ||
| description: [ | ||
| 'Determines the mode of hover interactions.', | ||
| 'If `closest`, a single hoverlabel will appear', |
There was a problem hiding this comment.
Please put flags between two * and attributes between ` chars.
E.g. this line should be
'If *closest*, a single `hoverlabel` will appear',antoinerg
commented
Mar 13, 2020
That's an interesting idea. Either this or we add a third button? cc @nicolaskruchten |
nicolaskruchten
commented
Mar 13, 2020
We don't want to add a new attribute because there's no real meaning to unified + closest. I also don't really want to add a new button today because the mode bar is already pretty big IMO. Maybe in unified hover mode the two existing buttons disappear by default? |
alexcjohnson
commented
Mar 13, 2020
By itself that's true, but it serves the purpose of saving the fact that you when you enable compare mode you want it to have unified hover. |
antoinerg
commented
Mar 13, 2020
This could be achieved in 2 lines of code. |
antoinerg
commented
Mar 13, 2020
I kinda like having |
alexcjohnson
commented
Mar 13, 2020
I'd be OK with, as a short-term measure, removing the hover mode buttons in one of the unified modes. Perhaps down the line this is just one more reason to put some menus into the mode bar - one for hovermode, another for drag mode... |
I remove the modebar buttons when hovermode is
I can open an issue for this one if you'd like! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eddy-geek
commented
Apr 8, 2020
nicolaskruchten
commented
Apr 8, 2020
Indeed, the Regarding Plotly Express, yes, in the docs here https://plotly.com/python/hover-text-and-formatting/ we recommend forcing |
nicolaskruchten
commented
Apr 8, 2020
jcunhafonte
commented
Apr 21, 2020
@antoinerg This looks awesome. Thank you. When there are many traces the information gets hidden. Any hint or suggestion to have the legend with scroll or above the graph? |
alexcjohnson
commented
Apr 23, 2020
Thanks @jcunhafonte - moved to a new issue #4786 |




Closes#4477 by introducing hover modes
x unifiedandy unified!Codepen:
TODO:
(marker | line).color(ec8c373)legend_horizontal_autowrap(fixed in ae5b9cc)