Session Ready
Exercise

Fixing a Plotly figure

Your colleague had started a project to create a visualization of sales for the first three months of 2020. However, she then left for some annual leave - but the boss wants the visualization now!

You can see she left behind a dictionary object that has started to define the visualization. It is your task to finish this dictionary with the important key arguments so it can be turned into a Plotly visualization.

In the exercises where it is needed throughout the course, plotly.graph_objects has already been loaded as go.

There is a monthly_sales dictionary that has been partially complete also available.

Instructions
100 XP
  • Examine the monthly_sales dictionary that has been printed in the console to determine what is missing.
  • Update the type inside the data element of monthly_sales to be a bar chart.
  • Update the text element of the title of the layout element to be 'Sales for Jan-Mar 2020'.
  • Create a figure using go.Figure() and the monthly_sales dictionary.