Proper use of plotting.x.relative?

I can’t figure out how to use plotting.x.relative properly, nor can I find any working examples of it.

Here’s an example of some code I’m using, if I comment out line 1 and uncomment line 2, everything works fine

const left = p.x.relative(history.get(rangeStart), 5);
//const left = p.x.get(history.get(rangeStart));
const right = p.x.get(history.get(rangeEnd-1));
const path = p.createPath();
path.moveTo(left, rangeHigh);
path.lineTo(left, rangeLow);
path.lineTo(right, rangeLow);
path.lineTo(right, rangeHigh);
path.lineTo(left, rangeHigh);
        color: rangeColor,
        width: 2,
        opacity: 1

What’s a working way to use plotting.x.relative or plotting.x.between?

Ah, figured it out, I needed

const left = p.x.relative(p.x.get(history.get(rangeStart)), 5);

or alternatively to read easier

const base = p.x.get(history.get(rangeStart));
const left = p.x.relative(base, 5);