df, _ = utilities.create_df_from_object_list(scrnaseq_summary_data_list, [ScRNAseqSummary], ['scrnaseq_summary']) print(df.head(5)) # Creating an ID column name gives us more interactive capabilities df['id'] = df['study_id'] df.set_index('id', inplace=True, drop=False) # ------------------------------------------------------------------------------------- # App layout graphComponentID = 'datatable-interactivity-container-line' dataTableComponentID = 'datatable-interactivity-line' card_graph = utilities.spinner_wrapper( dbc.Card( id=graphComponentID, body=True, color="secondary", )) dataTableComponent = utilities.data_table(dataTableComponentID, df) # Sorting operators (https://dash.plotly.com/datatable/filtering) layout = html.Div([ html.Div([ dbc.Row(dbc.Col(card_graph, width=12), justify="start"), # justify="start", "center", "end", "between", "around" ]), html.Br(), html.Div([ dbc.Row(dbc.Col(dataTableComponent, width=12), justify="start"), ]), html.Br(),
# 'textAlign': 'left' # } for c in ['sex', 'phenotype'] # ], # style_data={ # overflow cells' content into multiple lines # 'whiteSpace': 'normal', # 'height': 'auto' # } # )]), # color="dark", # https://bootswatch.com/default/ for more card colors # inverse=True, # change color of text (black or white) # outline=False, # True = remove the block colors from the background and header # ) card_graph = utilities.spinner_wrapper( dbc.Card( id='datatable-interactivity-container', body=True, color="secondary", )) dataTableComponent = utilities.data_table('datatable-interactivity', df) # Sorting operators (https://dash.plotly.com/datatable/filtering) layout = html.Div([ html.Div([ dbc.Row(dbc.Col(card_graph, width=12), justify="start"), # justify="start", "center", "end", "between", "around" ]), html.Br(), html.Div([ dbc.Row(dbc.Col(dataTableComponent, width=12), justify="start"), ]), # dash_table.DataTable(