How do I make an interactive multi line chart where only one line of interest is colored whereas the other lines are all greyed out:
So here, I want US to be colored Red but the other countries grey. This is what I have so far:
import pandas as pd
import plotly.express as px
df = px.data.gapminder()
fig = px.line(df, x='year', y='pop', color="country", hover_name="country",color_discrete_map={'United States': 'Red'})
fig.update_layout(autosize=False,width=700,height=500)
fig.show()
But it only changes the hover color, not the line color
I tried plotting US separately as its own figure and then updating it to the original figure but it does not work as well.
