           (while (.hasChildNodes n)
             (.removeChild n (.-lastChild n))))
         (when-let [data (seq (:data cursor))]
-          (draw-chart data (:div cursor) opts))))))
+          (draw-chart-chart data (:div cursor) opts))))))
 
 (defn handler [response]
   (swap! app-state assoc-in [:weight :data] (map #(list (:date %) (:weight %)) response)))

        chart (get-chart)]
    (.draw chart data options)))

(defn get-div-dimensions
  "Get width and height of a div with a specified id."
  [id]

    om/IDidMount
    (did-mount [_]
      (when-let [data (seq (:data cursor))]
        (draw-line-chart data (:div cursor) opts)))
    om/IDidUpdate
    (did-update [_ _ _]
      (let [{:keys [width height]} (:div cursor)]
