I am trying to place a current position on a real line where each steps are non linear.
Here is a screenshot of what I am trying to achieve (the current slider should be slightly below).
Given:
- the total length of the slider (end of the slider matches the last step)
- the different steps $[5,20,40,42,76,\ldots ]$.
- the length between two consecutive steps (constant)
How can I deduce the slider ratio ($0.25$ means position on the $\frac{1}{4}$ of the slider total length) to place the current position correctly ?

Another approach I was thinking was more like:
; I will think of the two approaches. Thanks :)
– michael-martinez Jun 17 '22 at 08:18