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

Connected

Exercise

A dropdown for sales by country

As you were working away at your desk, the global sales manager from the e-commerce company stopped by with a new challenge. She liked the recent sales graphs you created, but wants to filter by country and see the category data update live.

She emphasized using the approved country names: United Kingdom, Germany, France, Australia, and Hong Kong.

🛑 Note: You may need to enter Full screen mode to view the dashboard correctly with all elements side-by-side.

Instructions

100 XP
  • Add a dropdown component called dcc.Dropdown with an identifier of country_dd below line 16 to be used in a callback.
  • Set the input and output of the callback below line 30 to connect the country_dd dropdown to the major_cat graph.