 (defn draw-containers! [x-scale step]
   (let [step-length         #(- (scaled-time x-scale % "end_time")
                                 (scaled-time x-scale % "start_time"))
-        step-start-pos      #(x-scale (js/Date. (aget % "start_time")))]
+        step-start-pos      #(x-scale (js/Date. (aget % "start_time")))
+        step-duration       #(datetime/as-duration (duration (aget % "start_time") (aget % "end_time")))]
     (-> step
         (.selectAll "rect")
           (.data #(aget % "actions"))

                                         (highlight-selected-container! %)))
            (.on   "mouseout"  #(reset-selected! step))
          (.append "title")
            (.text #(gstring/format "%s (%s)" (aget % "name") (aget % "index"))))))

(defn draw-step-start-line! [x-scale step]
  (let [step-start-position #(scaled-time x-scale % "start_time")]

(defn draw-chart! [{:keys [parallel steps start_time stop_time] :as build}]
  (let [x-scale (create-x-scale start_time stop_time)
        chart   (create-root-svg parallel)
        x-axis  (create-x-axis (duration start_time stop_time))
        y-axis  (create-y-axis parallel)]
    (draw-axis!  chart x-axis "x-axis")
    (draw-axis!  chart y-axis "y-axis")
