dynamically update colours with filter_select

25 Views Asked by At

I'm trying to use crosstalk and filter_select to filter a large number of cities on a line graph. I've used this method so that only two cities load when the user enters the website. But the issue I have is that plotly assigns colours based on the full dataset, meaning there are 1,000 very similar colours assigned to each city even though the typical user only uses 3 or 4 cities. Is there anyway to have plotly assign colours from a shorter list and give different colours to each line in the filtered dataset? (e.g. first city selected is blue, second city selected is red etc)

0

There are 0 best solutions below