Relative Content

Tag Archive for plotly-dash

Having issues with Dash error loading layout

I’ve been trying to build this dashboard template but it doesn’t run properly and I keep getting the “Error loading layout” page with this code block, tried some fixes including updating packages but doesn’t seem to work. Any ideas how I could solve this?

Adding Percentages to Plotly Sunburst Plot Hover Tooltip – plotly.express

Trying to customize the hover data for a plotly express sunburst plot. Been scratching my head on this one a while, trying to comb the documentation but not coming up with quite what I want. I see the post on adding percentages to the text info on the graph, but I am having trouble adding them to the hover data instead. How can we move these percentages from “label” to “hover”? I see documentation for updating plotly.graph_objects plots, but not for plotly.express.

plotly dash – issue with multi buttons callback trigger

@app.callback( [Output(‘page-content’, ‘children’), Output(‘dashboard-selection-modal’, ‘is_open’, allow_duplicate=True), Output(‘dashboard-buttons’, ‘children’)], [Input(‘url’, ‘pathname’), Input(‘login-button’, ‘n_clicks’)], [State(‘username’, ‘value’), State(‘password’, ‘value’)], prevent_initial_call=True ) def display_page(pathname, n_clicks, username, password): if not ctx.triggered: raise PreventUpdate trigger_id = ctx.triggered[0][‘prop_id’].split(‘.’)[0] if trigger_id == ‘login-button’ and n_clicks: user = dao.authenticate_user(username, password) if user: login_user(user) dashboards = dao.get_dashboards_by_user(current_user.id) if len(dashboards) == 1: dashboard_module = load_dashboard_module(dashboards[0][1]) if […]