def to_x_value(pixel, axis, layout):
    """ Given a pixel, determine its domain value. """
    domain = axis.domain
    a = domain / layout.chart_width
    value = axis.minimum + a * (pixel - layout.chart_left)
    return value
