             [reagent.ratom :refer-macros [reaction]]
             [clojure.pprint :as pp]
             [iwaswhere-web.charts.data :as cd]))
-
-(defn bars
-  [indexed local k chart-h y-scale put-fn]
-  [:g
-   (for [[idx v] indexed]
-     (let [h (* y-scale (k v))
-           mouse-enter-fn (cc/mouse-enter-fn local v)
-           mouse-leave-fn (cc/mouse-leave-fn local v)]
-       ^{:key (str "pbar" k idx)}
-       [:rect {:class          (cc/weekend-class (name k) v)
-               :on-click       (cc/open-day-fn v put-fn)
-               :x              (* 10 idx)
-               :y              (- chart-h h)
-               :width          9
-               :height         h
-               :on-mouse-enter mouse-enter-fn
-               :on-mouse-leave mouse-leave-fn}]))])
 
 (defn ts-bars
   "Renders group with rects for all stories of the particular day."

         [bars-by-saga indexed-20 local chart-h 0.0035 put-fn]
         [bars-by-ts indexed-20 local 443.5 0.0044 put-fn]
         [:div.times-by-day
          [:time (:date-string day-stats)]
          [time-by-stories-list day-stats]]]))))

                     :x        (* 30 idx)
                     :y        y
                     :width    26
                     :height   h}]))
         (when weekend?
           [:rect {:fill    :white
                   :x       (* 30 idx)
                   :y       0
                   :opacity 0.5
                   :width   26
                   :height  chart-h}])]))))

(defn bars-by-story
  "Renders chart with daily recorded times, split up by story."
