Exercise

Combining HTML and Dash

Building on your recent graph work for the e-commerce company, you want to be able to show them both of the graphs in a single dashboard.

Luckily you have been working on your basic HTML positioning in Dash and have mastered the .Div() structural element. With these powerful tools in your hand, you can take your dashboard to the next level and create a Dash application to serve up both the line and bar graph you previously created. Since this is now a proper dashboard, it would be good to add a title at the top as well.

The line and bar graphs (line_graph and bar_graph) have been recreated for you.

Instructions

100 XP
  • Create a blank Dash app object on line 13.
  • Set up the layout using an overall .Div(), ensuring it will be able to take multiple sub-elements.
  • Add a title to your Dash app as a .H1() containing the text 'Sales by Country & Over Time'.
  • Add the line and bar graphs to the Dash app layout.