Hover data and binary-string option

When using the option “binary-string=True” with single-channel images, the initial pixel value is not available in the hoverdata. How can I display that initial value on the graph ? In the exemple below, it is displayed in a separate Input Component but I would like to display it in the “hover frame” that follows the mouse on the graph.
Thank you for your help.

@app.colback(
Output(“image-store”, “data”),
Input(“apply”, “n_clicks”),
)
def ct_display_changed(n_clicks):

if n_clicks is None:
    raise PreventUpdate

x, y = 300, 400
return np.arange(x*y).reshape((x,y))

@app.callback(
Output(“graph”, “figure”),
Input(“image-store”, “data”)
)
def ct_display_changed(image):

if image is None:
    raise PreventUpdate

fig = px.imshow(image, binary_string=True)
fig.update_xaxes(showticklabels=False)
fig.update_yaxes(showticklabels=False)

return fig

@app.callback(
Output(‘info-position’, ‘value’),
[
Input(‘graph’, ‘hoverData’),
Input(“image-store”, “data”)
]
)
def display_hover_data(hoverdata, image):

if hoverdata is None:
    raise PreventUpdate

y = int(hoverdata['points'][0]['y'])
x = int(hoverdata['points'][0]['x'])

return "({}, {}) : {}".format(x, y, image[y][x])

def layout():

return html.Div([
    dbc.Input(id="info-position"),
    dcc.Graph(id="graph",),
    dcc.Store(id="image-store"),
])