Hi guys, the following code is taken from the docs (Gantt Charts | Python | Plotly) and slightly adapted for my purpose:
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", template='plotly_white') fig.update_layout(showlegend=False, xaxis_tickformat='%y-%m-%d') fig.update_xaxes(showgrid=False, showline=True, linewidth=2, linecolor='black') fig.update_yaxes(showticklabels=False, title=None, autorange="reversed") fig.show() date = '2009-04-01'
As you can see in the code, I intentionally removed all grid lines. However I would like to display one single line to indicate a certain date like below:
Does anyone know how to do this?
Thank you very much in advance!