I have a code like that and I would like that my serve will be rebase to 100 each time I change the date in the slider. How is it possible ?
import plotly.graph_objects as go
import pandas as pd
# Load data
df = pd.read_csv(
"https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv")
df.columns = [col.replace("AAPL.", "") for col in df.columns]
df.set_index('Date', inplace=True)
df["Close"] = 100*df["Close"]/df["Close"].iloc[0]
fig = go.Figure(
data=go.Scatter(
x=df.index,
y=df['Close'])
)
fig.update_xaxes(rangeslider_visible=True)
fig.show()