   (reagent/render [dashboard]
                   (js/document.getElementById "metlog"))
   (.addEventListener js/window "resize" on-window-resize)
-  (on-window-resize nil)
   (go
     (swap! dashboard-state assoc :series (<! (<<< fetch-series-names)))))
 

(def dashboard-state (reagent/atom {:series [] :text ""}))

(def window-width (reagent/atom nil))

(def default-tsplot-width 1024)
(def default-tsplot-height 180)

(defn <<< [f & args]
  (let [c (chan)]

        @window-width
        @series-state
        [:div
         [:canvas (if-let [ node @dom-node ]
                    {:width (.-clientWidth node)
                     :height (.-clientHeight node)})]])})))

(defn series-pane [ series ]
  [:div.series-pane
