I want spikelines on, but absolutely no floating hover data text box because it ends up covering the horizontal spike line.
The closest I’ve gotten is fig.update_traces(hovertemplate=" ") (one space) which makes a very small empty text box but it still shows the name of the data line I hover over.
hovermode = None also turns off the spikelines. I’m doing this in Dash with the graph coming from plotly express from a px.line.
I have a checkbox that will, I hope, turn off the hover text and show the spikes instead (or maybe two checkboxes) but right now I can’t make the hover text go away and keep the spikelines.
You could use the hoverinfo property in your .update_traces() to control the hoverinfo on the graph.
With a graph_objects figure you could simply set hoverinfo='none' and disable the hoverinfo on the graph.
But Plotly Express uses the new hovertemplate mechanism for its hovers, so you’ll also need to set hovertemplate=None alongside hoverinfo='skip' in your .update_traces()
Awesome, thank you! I decided that fully off may not be as good as hovermode='x' so I just put in radioitems choices for three hover text options (minimal, full, none). Implemented live now on my covid case tracker, thank you!