How to map sorted values on x-axis to integers

The easiest way would be to use either Timelion or the Visual Builder for this.

Here's one post where a user is doing the offset in Timelion;

And a tutorial here which includes offset time;

And here's some info on the Time Series Visual Builder which can also do offsets;

Regards,
Lee