You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show only the series under the mouse in the hover label of a grouped line #159
A user shows one line per run for about 100 process runs (#88). A hover shows a label for every run at the hovered x. The user wants a label for the run under the mouse only.
Current state
_figure_hovermode (flexviz/adapters/plotly_adapter.py) sets Plotly's hovermode to "x", or to "y" when every trace in the figure is horizontal. In "x" mode, Plotly labels every trace that has a point at the hovered x. A grouped line with 100 children gives up to 100 labels.
"x" suits histograms and bars: the whole column under the mouse picks the bar.
A user can already override the mode per figure: dash.add_figure(hovermode="closest"). The adapter merges user layout keys over its own layout. The docs do not mention this.
Linked hover (flexviz/adapters/js/runtime/hover.js, flexviz/adapters/js/plotly/hover.js) starts from plotly_hover.
What is needed
Default. Choose the hover mode per figure from its traces. For example, use "closest" when the figure has a grouped line, and keep "x" or "y" for histograms and bars. A figure with both needs a rule.
Linked hover. Check that the guides in other figures still follow the hovered point in "closest" mode.
Docs. Show the hovermode override in docs/guides/customizing.md.
Tests. Extend the hovermode tests in tests/test_adapters.py. Add a browser check that a hover on a grouped line shows one label.
Activity