Closed
Description
Broken off of #2934... Here the text will be the computed delta value because PX rewrites the data frame and reuses the column name Finish
for x
:
import plotly.express as px
import pandas as pd
df = pd.DataFrame([
dict(Task="Job A", Start='2009-01-01', Finish='2009-02-28', Resource="Alex"),
dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15', Resource="Alex"),
dict(Task="Job C", Start='2009-02-20', Finish='2009-05-30', Resource="Max")
])
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task", text="Finish")
fig.update_yaxes(autorange="reversed")
fig.show()
The current unfortunate workaround is to set text=df["Finish"]+""
which causes a separate column to be created in the internal data frame.
Metadata
Metadata
Assignees
Labels
No labels