         [:th "% Down"]
         [:th "Duration"]]
        (when (:selected-mortgage state)
-         [draw-mortgage (:selected-mortgage state) state])
+         [draw-mortgage (:selected-mortgage state) true (:ui-event-chan state)])
        (for [[index m] (map-indexed vector (:mortgages state))]
-         ^{:key (str "mortgage-" index)} [draw-mortgage m state])]]]))
+         ^{:key (str "mortgage-" index)} [draw-mortgage m (= m (:selected-mortgage state)) (:ui-event-chan state)])]]]))
 
 (def some-mortgages
   (apply concat

   (for [m mortgages]
     {:mortgage m
      :value    (full-monthly-payment-amount m)})
   state])

(sm/defn draw-mortgage [m :- Mortgage
                        state :- UIState]
  [:tr.mortgage
   {:on-mouse-enter #(put! (:ui-event-chan state) {:type     :selection-start
                                                   :mortgage m})
    :on-mouse-leave #(put! (:ui-event-chan state) {:type :selection-end})
    :class          (when (= m (:selected-mortgage state))
                      "selected")}
   [:td (:house-price m)]
   [:td (:apr m)]

   [:text {:x 90 :y 30 :text-anchor "end"} (format-number (int (apply max (map :value data-points))))]

   (for [[index point] (map-indexed vector data-points)]
     ^{:key (str "rect-" index (point :value))} [draw-bar
                                                 point
                                                 index
                                                 (apply max (map :value data-points))
                                                 (= (point :mortgage) selected-mortgage)
                                                 ui-event-chan])

   (when selected-mortgage
     (let [point (first (filter #(= (:mortgage %) selected-mortgage)
                                data-points))
           index (.indexOf (to-array data-points) point)
           x (+ 110 (* index 30))]
