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

Exercise

Interactive sales dashboard tables

The overarching sales dashboard has come such a long way since you began.

The dashboard has been sent far and wide in the company with some very positive reviews. However, there have been some requests to make the tabular component more interactive. There has been a request to add the ability to select a certain column and have this change the axis on the scatter plot below.

Instructions

100 XP
  • Make sure the three money columns are able to be selected below lines 23, 29, and 35.
  • Allow only one column to be selected at a time below line 46.
  • Create a callback that is triggered on selecting a column that will return an adjusted scatter plot figure below line 92
  • In the callback function, below line 100 extract the selected column's name from the first index in selected_columns then use it below line 107 as the y-axis in the created scatter plot.