Chronological legend in time series and matching trace colors across panels

I am building dashboard to debug a antenna system using measurements collected in a InfluxDB time series db. I managed to use a Plotly polar panel to plot the azimuth and elevation for each track and with help from Claude.ai keep the legend in chronological order.
Furthermore a time series panel displays the corresponding RF levels over time for each track. trouble is I would like the colors for each track to match between the two panels. For example if Track 041 is blue in the polar diagram, I want the Rx level trace for track 041 also to be blue etc … Any guidance on how to achieve this would be very helpful, because even Claude isn’t coming up with working solutions.

It’s important that the legend is listed in a chronological way, so if the track numbers are 053, 041, 268, 453 , 23 … I need it to remain in that order on both panels.
This is my first challenge to convince Grafana to not sort the time series panel legend.

I cannot define the track colors manually with overrides, there are too many track numbers (possibly 1000’s) so it must be done dynamically using a color palette preferably.