How to sort series in state timeline plugin

Hello, here is the basic starting graph

I have a state time line graph with N series (tables) and I would like reorder the series according to a rate of occupancy. Each line is a stream of “busy” (red) - “free” (green).

For each serie, I compute the percentage of time it is in the busy state. I get a result from 0 to 100%. I have been able to show the percentage in the ascendant order on the right of the picture

BUT, I don’t know how to reproduce this on the left part of the figure. How to tell the state time line to sort the series in the ascendant order according to this computed percentage. sort() is used inside a single serie

The idea is to get an easy representation from low usage to high usage

Any idea how to sort those series ?

Thanks, have a good day.

I’ve seen other people trying to sort series in a numerical order (that is quite similar to my problem) but I could not find a solution yet