Just curious about the code, how is plot_top_n_sales() triggered – when those interactive widgets changed value, the plot is regenerated.
Hi @Jack_Tao , sorry for the late reply. The interact decorator (@widgets.interact) allows you to define a function and interact with it in a single shot. Check out this documentation for more detail: Using Interact — Jupyter Widgets 8.1.5 documentation
Hope this helps
Jess
1 Like