Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Gantt chart hide axis label

I am creating a gantt chart in Dash using the built in gantt chart from plotly. I am plotting about 500 bars at a time on the plot and so the y axis label looks awefule. I am also using a ‘callback’ to create my figure. How can I hide the y axis so it doesn’t look so bad?

html.Div([dcc.Dropdown(id = ‘plane-dropdown’,
{‘label’: ‘F-15 (C model)’, ‘value’: ‘F-15 (C Model)’},
{‘label’: ‘F-15 (E model)’, ‘value’: ‘F-15 (E Model)’},
{‘label’: ‘Global Hawk’, ‘value’: ‘Global Hawk’}
value=‘Global Hawk’),
dcc.Graph(id=‘gantt’),#end creation of gantt chart
#adding a range slider below the graph.
marks={i: ‘Year {}’.format(i) for i in range(2016, 2030)},
value=[2018, 2025])

def update_graph(selected_dropdown_value,slider_range):
df = dfg[dfg.plane==selected_dropdown_value]
df = df[(df.FY>slider_range[0]) & (df.FY<slider_range[1])]
df = df.reset_index()
del df[‘index’]
return ff.create_gantt(df,index_col=‘Resource’, group_tasks=True,
title =‘Gantt - Time at each gate.’,width=1400,height=600)