Exploring additional features of dropdowns
The Dropdown
component has an optional parameter, multi
, that takes a Boolean argument, which we can set to True
to allow this:
dcc.Dropdown(id='gini_country_dropdown', multi=True, options=[{'label': country, 'value': country} for country in gini_df['Country Name'].unique()]),
You can now make the changes and use the Gini country bar chart for as many countries as you like. The height of that figure on the page dynamically expands/collapses based on the dynamic height that we set, so we also don't need to worry about this aspect of the layout. The users will manage it themselves while interacting with the components...