def update_graph()

in Dashboard/pages/gantt.py [0:0]


def update_graph(option_segment):
    print(option_segment)
    print(type(option_segment))

    container = "Segment Types is:{}".format(option_segment)
    dff = df.copy()
    dff = dff[dff['Segment Type'] == option_segment]
    # Plotly Express
    fig = px.timeline(dff.head(50), x_start="Start Time", x_end="End Time", y="Segment Name", color="Number of Logs")
    fig.update_yaxes(autorange="reversed")
    fig.update_layout(template = 'plotly_dark')
    #fig.show()

    return container, fig