I created a scatter plot using plotly.object (please see the picture).
Furthermore you will find in the image of the dataframe used for the graph. Finally you will find below the code of my visualization:
fig = go.Figure() fig.add_trace(go.Scatter(x=test["week_number"], y=test["growth_rate"], marker_color = "#00e39b", mode='markers' , hovertext=test["week"])) fig.update_traces(mode='lines+markers') fig.update_layout( title_text='Growth rate of new users', title_x = 0.5, xaxis_title_text='Number of week', yaxis_title_text='Growth rate', plot_bgcolor="#EBEDEF", ) fig.show()
My question is: how to format the hover data (text displaying when we put the mouse on). Indeed I would like to be able to display the information this way:
rate : 68% - week : 23
June 01, 2020 - June 07, 2020
Thank you very much