         right:  10
     }
 
-getWidth  = (elem) -> $(elem).width()
-getHeight = (elem) -> Math.floor(getWidth(elem)/3)
+getWidth  = () -> 500
+getHeight = () -> Math.floor(getWidth()/3)
 
 # Get the submission data for the given facility_id
 # returns an array of objects:

#   figures: An array of objects, each object being
#       class: "<html class>"
#       getFig: (x, y, width, height) -> figure
# returns:
#   the svg object, so it can be further manipulated
drawGraph = (elem, figures) ->
    $_elem = $(elem)
    $_elem.empty()
    facility_id = parseInt($_elem.attr("facility-id"))
    data = $_elem.data("data")
    if not data
        data = getData(facility_id)
        $_elem.data({data: data})
    # dimensions for the graph
    margin = getMargins()
    width  = getWidth(elem)
    height = getHeight(elem)

    x = d3.time.scale().range([0, width])
    y = d3.scale.linear().range([height, 0])
    xAxis = d3.svg.axis().scale(x).orient("bottom")
    yAxis = d3.svg.axis().scale(y).orient("left")
    
    svg = getSVG(elem, width, height, margin)
    
    washersLine = d3.svg.line()
        .x( (d) -> x(d.date) )
        .y( (d) -> y(d.washers) )
        .interpolate("monotone")
    washersArea = d3.svg.area()
        .x( (d) -> x(d.date) )
        .y0( height )
        .y1( (d) -> y(d.washers) )
        .interpolate("monotone")

    driersLine = d3.svg.line()
        .x( (d) -> x(d.date)  )
        .y( (d) -> y(d.washers + d.driers))
        .interpolate("monotone")
    driersArea = d3.svg.area()
        .x( (d) -> x(d.date) )
        .y0( (d) -> y(d.washers) )
        .y1( (d) -> y(d.washers + d.driers) )
        .interpolate("monotone")


    x.domain(d3.extent(data, (d) -> d.date))
    y.domain([0, 100])

            .datum(data)
            .attr("class", fig.class)
            .attr("d", fig.getFig(x, y, width, height))

# ######### GRAPHING FUNCTIONS ######### #

