Dashboard/index.py [260:282]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [
        Output(component_id='output_container', component_property="children"),
        Output(component_id='segment', component_property="figure")],
    [Input(component_id='Segment_Types', component_property="value")]
)




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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



Dashboard/pages/gantt.py [103:125]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    [
        Output(component_id='output_container', component_property="children"),
        Output(component_id='segment', component_property="figure")],
    [Input(component_id='Segment_Types', component_property="value")]
)




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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



