Search box in plotly-dash legend

Viewed 811

I'm following the examples for Line Charts from plotly: https://plotly.com/python/line-charts/

import plotly.express as px

df = px.data.gapminder().query("continent != 'Asia'") # remove Asia for visibility
fig = px.line(df, x="year", y="lifeExp", color="country",
              line_group="country", hover_name="country")
fig.show()

I've seen that if I double click on one element in the legend it only shows the lines that match the legend value. Is it possible to include a search tool when the legend has many options? Like in this case where I have the color set to country and I want to easily find and select 5 countries without scrolling through.

Thank you!

0 Answers
Related