def constantLine(requestContext, value):
    """
    Takes a float F.

    Draws a horizontal line at value F across the graph.

    Example::

        &target=constantLine(123.456)

    """
    name = "constantLine(%s)" % str(value)
    start = int(epoch(requestContext['startTime']))
    end = int(epoch(requestContext['endTime']))
    step = int((end - start) / 2.0)
    series = TimeSeries(str(value), start, end, step, [value, value, value])
    series.pathExpression = name
    return [series]

    Takes a float F.

    Draws a horizontal line at value F across the graph.

    Example::

        &target=constantLine(123.456)

    
graphite_api/functions.py