I am plotting a bar chart and I want to reflect certain columns when hovering over those. How would I add that?
My dataframe
Date | Sku1 | Sku2 |...|Total_accounts|Total_purchases
2020-01-01 | 12 | 34 | ..| 33 | 55
2020-03-01 | 122 | 343 | ..| 35 | 35
2020-04-01 | 11 | 12 | ..| 13 | 65
However, when plotting the chart, I want to keep the last two columns for hovering purposes (not plotting) and the only SKUS should be displayed in the bars. How do I tweak this?
My plotly code is:
fig=px.bar(df.set_index("Date").pipe(lambda d: d.div(d.sum(axis=1), axis=0)).reset_index(),
x="Date",
y=[c for c in df.columns if c != "Date"],).update_xaxes(title='Test', visible=True, showticklabels=True).update_yaxes(title='Test', visible=True, showticklabels=False)
fig.show()
