     (println "Running " parallel "x with " (count steps) "steps.")
     (draw-steps! x-scale chart steps)))
 
+;;;; Main component
 (defn build-timings [build owner]
   (reify
     om/IDidMount

      (.append "svg")
      (.attr "width" timings-width)))

(defn draw-containers! [x-scale step]
  (let [step-length      #(- (x-scale (js/Date. (aget % "end_time")))
                             (x-scale (js/Date. (aget % "start_time"))))
        container-pos    #(* bar-height (inc (aget % "index")))
        container-height #(- bar-height bar-gap)
        step-start-pos   #(x-scale (js/Date. (aget % "start_time")))]
    (-> step
        (.selectAll "rect")
          (.data #(aget % "actions"))
        (.enter)
          (.append "rect")
          (.attr "class" "container-step")
          (.attr "width" step-length)
          (.attr "height" container-height)
          (.attr "y" container-pos)
          (.attr "x" step-start-pos))))

(defn draw-step-start-line! [x-scale step]
  (-> step
      (.selectAll "line")
        (.data #(aget % "actions"))
      (.enter)
        (.append "line")
        (.attr "class" "container-step-start-line")
        (.attr "x1" #(x-scale (js/Date. (aget % "start_time"))))
        (.attr "x2" #(x-scale (js/Date. (aget % "start_time"))))
        (.attr "y1" #(* bar-height (inc (aget % "index"))))
        (.attr "y2" #(+ (* bar-height (inc (aget % "index")))
                        (- bar-height bar-gap)))))

(defn draw-steps! [x-scale chart steps]
  (let [step (-> chart

(def timings-width 800)
(def bar-height 20)
(def bar-gap 10)
(def container-bar-height (- bar-height bar-gap))

;;; Helpers
(defn create-x-scale [start-time stop-time]
  (let [start-time (js/Date. start-time)
        stop-time  (js/Date. stop-time)]
