       attr('width', width + padding).
       attr('height', height + padding)
 
-    @graph.append("svg:rect").
-      attr("width", width + padding).
-      attr("height", height + padding).
-      attr("fill", 'white')
-
-    @graph.append("svg:rect").
+    @graph.append('svg:rect').
+      attr('width', width + padding).
+      attr('height', height + padding).
+      attr('fill', 'white')
+
+    @graph.append('svg:rect').
       attr('id', 'legend').
       attr('x', 5).
       attr('y', 5).

              Math.max(maxHeight,3)

  initialize: (@demand) ->
    @profileSet = window.sirius.models.get("demandprofileset")
    @typeOrder = @profileSet.get('vehicletypeorder')
    @link = @demand.get('link')
    @vizWindow = _.template($("#demand-visualizer-window-template").html())
    if @demand.is_constant()
      @constDemand = _.template($("#constant-demand-template").html())
    else
      @dataDisplay = _.template($("#demand-graph-template").html())
      @$el.html @vizWindow(elemId: @link.id, content: @dataDisplay(elemId: @link.id))
    @$el.attr 'title', "Demand - Link #{@link.get('name')}"


        vehicleType = @typeOrder.get('vehicle_type')[i].get('name')
        padValueArray(vehicleTypeVals)

        @graph.append('svg:path').
          attr('d', wrapSteps(vehicleTypeVals)).
        	attr('fill', 'none').
          attr('class', "vehicle-graph-#{i}").
        	attr('stroke', 'black')

        @graph.selectAll('stdDevBoxes').
        	data(vehicleTypeVals).
        	enter().
        	append('svg:rect').
        	attr('x', (d, idx) -> xScale(idx) + padding).
        	attr('y', (d) => topYVal(height, yScale, d, @demand) + padding - 2).
        	attr('width', xScale(1)).
          attr('fill', vehicleTypeColors[i]).
        	attr('opacity', '0.4').
          attr('class', "vehicle-graph-#{i}").
          attr 'height', (d) =>
            maxHeight = yScale(Math.max(2*stdDevAdd, 2*stdDevMult*d))
            topY = topYVal(height, yScale, d, @demand) + padding - 2
            if maxHeight > height - topY + padding - 10
