     (render [_]
       (dom/g #js {:className "x axis" :transform (str "translate(0," chart-height ")")}
              (om/build x-axis-path-component scale)
-             (render-x-axis-ticks scale)))))
+             (om/build x-axis-ticks-component scale)))))
 
 (defn component [{:keys [data-points]} owner]
   (reify

      (.domain #js [0 (apply max response-times)])
      (.range #js [0 chart-width])))

(defn render-bar [x-scale y-scale bar]
  (let [scaled-x (x-scale (.-x bar))
        scaled-y (y-scale (.-y bar))
        scaled-dx (x-scale (.-dx bar))]
    (dom/g #js {:transform (str "translate(" scaled-x "," scaled-y ")")
                :className "bar"}
           (dom/rect #js {:width (dec scaled-dx)
                          :height (- chart-height scaled-y)})
           (dom/text #js {:dy "0.75em"
                          :y 6
                          :x (/ scaled-dx 2)
                          :textAnchor "middle"}
                     (when (pos? (.-y bar)) (.-y bar))))))

(defn x-axis-path-component [scale]
  (reify

        (dom/path #js {:className "domain"
                       :d (str "M0" (aget rng 0) ",6V0H" (aget rng 1) "V6")})))))

(defn x-axis-ticks-component [scale]
  (reify
    om/IRender
    (render [_]
      (let [ticks (.apply (.-ticks scale) scale)]
        (apply dom/g nil (map (fn [tick]
                                (dom/g #js {:className "tick" :transform (str "translate(" (scale tick) ",0)")}
                                       (dom/line #js {:x2 0 :y2 6})
                                       (dom/text #js {:dy ".71em" :y 9 :x 0 :style #js {:textAnchor "middle"}} tick)))
                              ticks))))))

(defn x-axis-component [{:keys [chart-height scale]} owner]
  (reify
