                          (.interpolate "linear"))
         y-axis (graph/create-axis total-scale :right width tick-padding graph/number-formatter y-tick-count)
         x-axis (graph/create-axis time-scale :top height tick-padding graph/month-formatter x-tick-count)
-        x-axis-group (-> (.append line-group "g")
+        x-axis-group (-> (get-g ".axis.x" line-group)
                          (.attr "transform" (str "translate(0 ," (- height 25) ")"))
                          (.attr "class" "x axis")
                          (.call x-axis)

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

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


(defn get-svg
  [selector]
  (let [svg (.select (.select js/d3 selector) "svg")]
    (if (nil? (first (first (js->clj svg)))) (.append (.select js/d3 selector) "svg") svg)))

(defn get-g
  [selector from-elem]
  (let [g (.select from-elem selector)]
    (if (nil? (first (first (js->clj g)))) (.append from-elem "g") g)))

(defn set-graph
  [graph-data]
