I need the option to deselect multiple timeline (jobs) on y-axis so that they are hidden. For example following sample code.
import plotly.express as px
import pandas as pd
df = pd.DataFrame([
dict(Task="Job A", Start='2009-01-01', Finish='2009-02-28'),
dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15'),
dict(Task="Job C", Start='2009-02-20', Finish='2009-05-30')
])
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task")
fig.update_yaxes(autorange="reversed") # otherwise tasks are listed from the bottom up
fig.show()
I need to option to deselect one or more y-axis Job A/B/C so that they are hidden?
I Found following similar question. But it divides y-axis into categories, instead of selectable options. Y-axis doesn't fit the number of timelines