 (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)]

      
      :component-did-mount
      (fn [ this ]
        (swap! series-state assoc :dom-node (.-parentNode (reagent/dom-node this)))
        (go
          (swap! series-state assoc :series-data (<! (<<< fetch-series-data series @query-window-secs)))))

      :reagent-render
      (fn [ ]
        @window-width
        (let [ dom-node (:dom-node @series-state)]
          [:canvas
           {:width (dom-node-width dom-node default-tsplot-width)
            :height (dom-node-height dom-node default-tsplot-height)}]))})))

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

  (let [ ctx (.getContext canvas "2d")]
    (tsplot/draw ctx (dom-node-width canvas) (dom-node-height canvas) series-data)))

(defn series-tsplot-plot-canvas [ series ]
  (let [ series-state (reagent/atom { }) ]
    (reagent/create-class
     {:display-name (str "series-tsplot-" series)
