✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Mysteriously missing hovertext %{y} element

I am creating stock charts that compare the price/gain of one selected stock to a selected Market Index. I tailored the hovertext for my stock to read ‘{timestamp}
Close: {close}
Gain: {gain}’ It works great for the stock line but when I use the same exact code for the Index, the gain value does not appear.

data.append(go.Scatter(x=sdf.index,
                       y=sdf['aclose'],
                       connectgaps=True,
                       line={'color': self.dash.linecolor[0]},
                       mode="lines",
                       showlegend=False,
                       hovertext=idf['pg'] * 100,
                       hovertemplate='%{x}<br>Close: %{y}<br>Gain: %{hovertext:.02f}%',
                       yaxis='y2'))

displays:

and

data.append(go.Scatter(x=idf.index,
                       y=idf['close'],
                       connectgaps=True,
                       line={'color': self.dash.linecolor[1]},
                       mode="lines",
                       showlegend=False,
                       hovertext=sdf['pg'] * 100,
                       hovertemplate='%{x}<br>Close: %{y}<br>Gain: %{hovertext:.02f}%',
                       yaxis='y3'))

displays:

Any ideas on what adjustment I need to get the Close value which is the y axis value in both cases to appear over the second line?