                   (.data (clj->js graph-data)))
         enter (.enter lines)]
     (println "set-graph:" graph-data)
+    (-> (.selectAll line-group "path")
+        (.remove))
     (-> (.append line-group "path")
         (.attr "d" (line-segment (clj->js graph-data)))
         (.attr "class" "year-line"))

             :identifier (:identifier x)
             :val (get-data-type parent type (:totals x))}) data)}))

;(defn get-line-graph-data
;  [type data]
;  ;(println "get-line-graph-data: " (count data))
;  {:title (get-graph-title type)
;   :data (map (fn [x]
;          {:month (:month x)
;            :year (:year x)
;            :type (:type x)
;            :identifier (:identifier x)
;            :val (get-data-type type (:totals x))}) data)})

(defn get-svg
  [selector]
  (if-let [svg (.select (.select js/d3 selector) "svg")]
    svg
    (.append (.select js/d3 selector) "svg")))

(defn get-g
  [selector from-elem]
  (if-let [g (.select from-elem selector)]
    g
    (.append from-elem "g")))

(defn set-graph
  [graph-data]

                         (.attr "y" 12)
                         (.attr "dx" "-1.5em")
                         (.style "text-anchor" "start"))
        y-axis-group (-> (get-g ".axis.y" line-group)
                         (.attr "transform" (str "translate(0, -25)"))
                         (.attr "class" "y axis")
                         (.call y-axis)
