1. Learn
  2. /
  3. Courses
  4. /
  5. Building Dashboards with Dash and Plotly

Connected

Exercise

Fixing a broken dashboard

Oh no! While transferring your interactive sales dashboard to production, the file was corrupted. Most of the files were recovered; however, some crucial functions and elements have gaps, largely around the triggered callback function.

Can you use your knowledge of Dash callbacks to fix this dashboard?

Instructions

100 XP
  • Set the country_filter variable to 'All Countries' below line 34 so this appears on page load.
  • Ensure that the ecom_sales DataFrame is not overwritten inside the update_plot function below line 36 by using a copy method.
  • Return the bar_fig_major_cat figure from the update_plot function below line 45, so the Plotly figure is re-rendered.