       (.scale x-scale)
       (.orient "bottom")))
 
-(defn get-y-scale [height data]
+(defn get-y-scale [data]
   (-> (.. js/d3 -scale linear)
       (.domain #js [0 (.max js/d3 data #(.-y %))])
-      (.range #js [height 0])))
+      (.range #js [chart-height 0])))
 
-(defn get-x-scale [width values]
+(defn get-x-scale [response-times]
   (-> (.. js/d3 -scale linear)
-      (.domain #js [0 (apply max values)])
-      (.range #js [0 width])))
-
-(defn create-chart [el load-test]
-  (let [height 150]
-
-    ;; axis
-    (-> (.select (.select js/d3 el) "svg g")
-        (.append "g")
-        (.attr "class" "x axis")
-        (.attr "transform" (str "translate(0," height ")")))))
-
-(def label-formatter (.format js/d3 ",.0f"))
+      (.domain #js [0 (apply max response-times)])
+      (.range #js [0 chart-width])))
 
 (defn format-label [x]
-  (label-formatter (.-y x)))
+  (let [v (.-y x)]
+    (when (pos? v) v)))
 
-(defn update-chart [el load-test]
-  (let [width 446
-        height 150
-        values (apply array (map :response-time (:data-points load-test)))
-        x-scale (get-x-scale width values)
+(defn update-chart [el data-points]
+  (let [response-times (map :response-time data-points)
+        x-scale (get-x-scale response-times)
 
         data ((-> (.. js/d3 -layout histogram)
                   (.bins (.ticks x-scale 20)))
-              values)
+              (apply array response-times))
 
-        y-scale (get-y-scale height data)
+        y-scale (get-y-scale data)
 
         svg (.select (.select js/d3 el) "svg g")
 

      (-> (.append "rect")
          (.attr "x" 1)
          (.attr "width" (dec (x-scale (.-dx (aget data 0)))))
          (.attr "height" #(- height (y-scale (.-y %)))))

      ;; new texts
      (-> (.append "text")

                (.data data)
                (.attr "transform" #(str "translate(" (x-scale (.-x %)) "," (y-scale (.-y %)) ")")))]

    ;; new bars
    (doto (-> bar
              (.enter)
              (.append "g")
