Plotly Scatter and Scattermapox- line color as a function of something else

Hi all,

I know that multiple folks have looked at this in the past, and the answer seems to be “sorry, no”. But I’ll try again.

I have a Dash app (soon to be Dash Enterpise app if contracts get sorted), and I am plotting a lot of routes using Scattergeo, and I’d like the route colour to represent something else. If I have each as an individual trace, this is possible, but the behaviour becomes sluggish and unresponsive beyond about 400 traces.

The obvious fix is to put them as one big trace separated by [None], which I can do, but I then lose the ability to have distinct colours on the graph (though can change hover info etc).

I can see why devs might not want this to be a feature - because it could lead to cases where you’d need to interpolate between two colours - but that’s not actually what I want to do (though it’d be awesome to be able to have lines with varying colour).

At a minimum I’d like the line colour between index [i] and index [i+1] to be the color specified in the colour index [i].

This doesn’t seem like an enormous change, but I’m also aware that this is open source and I’m getting what I’m paying for.

But…pretty please…is this possible?

er…I’m actually using Scattermapbox, not Scattergeo. Title edited.