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

        	attr("width", xScale(1)).
          attr("fill", vehicleTypeColors[i]).
        	attr("opacity", "0.4").
        	attr("height", (d) ->
            # Enforce coloring even if stddev. not present to distinguish
            # vehicle types

        text(name)

      @graph.append('svg:rect').
        attr('id', "legend-#{idx}").
        attr('x', 100 + 50*idx).
        attr('y', 10).
        attr('width', 50).
        attr('height', 30).
        attr('opacity', '0.4').
        attr('enabled', true).
        attr('fill', vehicleTypeColors[idx]).
        on 'click', ->
          el = $(@)
          if el.attr('enabled') == 'true'
            el.attr('opacity', '0.0')
            el.attr('enabled', false)
            d3.selectAll(".vehicle-graph-#{idx}").style('visibility','hidden')
          else
            el.attr('opacity', '0.4')
            el.attr('enabled', true)
            d3.selectAll(".vehicle-graph-#{idx}").style('visibility','visible')

    vals = @demand.demands_by_vehicle_type()

