 (defn init-graph [state]
   (let [{:keys [width height frame data]} @state
         force (.. d3 -layout force)]
+    (set! (.. d3 -selection -prototype -moveToFront)
+      (fn []
+        (this-as this
+                 (.each this (fn []
+                               (this-as this
+                                        (.. this -parentNode (appendChild this))))))))
     (swap! state assoc-in [:svg] (.. d3
                                       (select frame)
                                       (append "svg")

  (go
    (let [{:keys [ws-channel error]} (<! (ws-ch "ws://localhost:8091/data/ws"))
          broadcaster 2834511 #_(rand-nth (keys broadcasters))
          random-day 27 #_(rand-int 31)]
      (swap! state assoc-in [:ws-channel] ws-channel)
      (swap! state assoc-in [:day] random-day)
      (>! ws-channel {:topic :user-tree :data {:broadcaster broadcaster :day random-day}})

                :stroke-width 3}))))





