Two x-axis hovermode

I drew a chart with two x-axis up and down.
I want to see two values at a time using the hovermode function, but the values are output separately as shown in the picture below.
image
image

I want to see the price like the picture below, is there a way?
image

fig.add_trace(
            go.Scatter(x=df_AD_Total[i].index, y=df_AD_Total[i][Stock_code[i]],
            xaxis="x"+str(i+1), yaxis = "y"+str(i+1), line = dict(color='slategray')), row = int(i/3)+1, col = (i%3)+1
        )

fig.add_trace(
        go.Scatter(x=df_LB_Total[i].index, y=df_LB_Total[i][Stock_code[i]],
        xaxis="x"+str(len(Stock_code)+i+1), yaxis = 'y'+str(i+1), line=dict(color='DarkOrange')))

**fig.update_layout(hovermode ='x unified')**

I am still getting used to dealing with the second x-axis, but I got the two stock prices, set up the second axis, and added the unified setting. I think this will get you closer to your goal. Since it was only a partial code, the x unifid setting may not work for your code and the second axis setting may be different from yours.

from plotly.subplots import make_subplots
import plotly.graph_objects as go
import yfinance as yf
import pandas as pd

df = yf.download("AAPL MSFT", start="2012-01-01", end="2022-01-01", group_by='ticker')

# long format 
df = df.stack(0).reset_index().rename(columns={'level_1':'Ticker'})

aapl = df.query('Ticker == "AAPL"')
msft = df.query('Ticker == "MSFT"')

fig = make_subplots(rows=1, cols=1, specs=[[{"secondary_y": True}]])
# fig = go.Figure()
fig.add_trace(
    go.Scatter(
        x=aapl['Date'],
        y=aapl['Close'],
        xaxis="x",
        yaxis="y",
        line=dict(color='slategray'),
        name='AAPL'
    ), row=1, col=1
)
fig.add_trace(
    go.Scatter(
        x=msft.loc[2567:,'Date'],
        y=msft.loc[2567:,'Close'],
        # xaxis="x2",
        # yaxis="y2",
        line=dict(color='darkorange'),
        name='MSFT'
    ), row=1, col=1, secondary_y=True
)

fig.update_layout(
    xaxis2={**fig.layout.xaxis.to_plotly_json(), "side": "top", "overlaying": "x"},
)
fig.data[1].update(xaxis="x2")
fig.update_layout(hovermode ='x unified')

fig.show()