How do d2p/l2p and ._offset work?

I’d like to make a custom tooltip for a graph in plotly using react. I’ve been using xaxis.d2p and xaxis._offset from the hover data returned on hovering over a point. However, the position isn’t exactly in the center of the point… how are these values obtained?