AWS elasticbeanstalk deployment of dash app getting stuck loading

</>

def data_table(id_name):
return html.Div(dash_table.DataTable(id=id_name,
style_header={‘backgroundColor’: ‘#D8DDEB’,
‘fontWeight’: ‘bold’,
‘whiteSpace’: ‘normal’,
‘height’: ‘auto’,
},
style_cell={ ‘fontFamily’:‘sans-serif’,
‘width’:‘120px’},
style_data={
‘whiteSpace’: ‘normal’,
‘height’: ‘auto’,
},
style_table = {
‘overflowX’:‘auto’,
‘overflowY’:‘auto’,
‘maxHeight’:“400px”
},
export_format=“csv”,
style_cell_conditional = [
{
‘if’:{
‘column_type’:‘text’
},
‘textAlign’:‘left’
},
{
‘if’:{
‘column_type’:‘numeric’
},
‘textAlign’:‘right’
}
],
fill_width=False
),
className = ‘mx-auto’)

</>

Why are you having the table not display? Do you not need to show the data? If so, you could just use a dcc.Store.

I want the user to be able to toggle (using radio buttons) between viewing a plotly graph, and a data table version of the same data. Is there a better way to hide the data table when I want the user to only be able to see the graph?

Try wrapping the whole table in a div that you hide instead.

Or, you could use tabs from dbc.

https://dash-bootstrap-components.opensource.faculty.ai/docs/components/tabs/

I think the whole table is currently wrapped in a div? I will try using tabs though.

Thanks for all the help!

1 Like