Unified hovermode with sublots

Hi, I was wondering if is it possible to have the new unified hovermode working in the case we have subplots

from plotly.subplots import make_subplots
import plotly.graph_objs as go
import plotly.express as px

df = px.data.gapminder().query("continent=='Oceania'")

countries = df["country"].unique()

fig = make_subplots(rows=len(countries), cols=1, shared_xaxes=True)
for i,country in enumerate(countries):


fig.update_layout(hovermode="x unified")

I’ve an hovermode in every subplots but I’d like to have a straight line that go across subplots.

Hi @baobob, the β€œx unified” hovermode does not work (yet) across subplots. We have an open issue for this which you can subscribe to https://github.com/plotly/plotly.js/issues/4755. If you’re only interested in the spike line extended to the other subplots you can do this with


(imposing that there is only one xaxis)
but this will just give you the extended spike line, not the hover information of all subplots.


@Emmanuelle thanks. What I’d like to achieve is similar to Spain, confirmed weekly deaths plot in Economist

This works great! Thanks