@Unixmad wrote:
I have the following create table function, and it works accordingly in Jupyter Notebook, however when I call it out in the Dash app nothing renders.
def create_table(dataframe): fig = go.Figure(data=[go.Table( # header=dict(values=['A Scores', 'B Scores'], # line_color='darkslategray', # fill_color='lightskyblue', # align='left'), cells=dict(values=[dataframe.columns.values.tolist(), # 1st column df_cohort_3.iloc[0:1].values.tolist()[0] # 2nd column ], line_color='darkslategray', fill_color='lightcyan', align='left')) ]) #fig.update_layout(width=500, height=600) return fig.show()
Here is my Dash logic:
app = dash.Dash() app.layout = html.Div(style={'backgroundColor': colors['background']}, children=[ #Title html.Div(html.H1(children="My Dashboard ")) #Generate Dash table ,create_table(df_1) , ]) if __name__ == '__main__': app.run_server(debug=False, port=3005)
Any suggestions?
Posts: 1
Participants: 1