def x_pixels_to_domain(pixels, axis, layout):
    """ Convert a pixel distance to a domain distance """
    domain = axis.domain
    a = domain / layout.chart_width
    shift = a * pixels
    return shift
