...
/Exercise: Custom Buttons and Dropdown Menus
Exercise: Custom Buttons and Dropdown Menus
Practice with some lab exercises.
Exercise
Using the Hang Seng Index dataset, create either a dropdown menu option or a set of buttons to alternate between the Close
and the Volume
series. Decide whether we should update
, relayout
, restyle
, etc.
Solution
-
An empty figure is created using the
go.Figure()
function on line 2. -
A scatter trace is added to the figure using the
fig.add_trace()
function on line 5. ...