                            (.attr "x2" (x-scale x2))
                            (.attr "y2" (+ chart-height 7)))
 
-                       (on-brushend-fn selected))))              
+                       ;; CIRCLES and TEXTS -----------------------------------------------------------------------
+                       (let [selected-rows (->> data
+                                                (filter
+                                                 (fn [row]
+                                                   (let [v (x-value-fn row)]
+                                                     (and (<= x1 v) (<= v x2)))))
+                                                vec)
+                             selected-rows (if-not (empty? selected-rows) selected-rows
+                                                   ;; Тогда выбираем первое от первого селектора
+                                                   (loop [[r & t] data]
+                                                     (cond (nil? r)               []
+                                                           (>= (x-value-fn r) x1) [r]
+                                                           :else                  (recur t))))
+
+                             x1-row (first selected-rows)
+                             x2-row (last selected-rows)
+
+                             interval (condp = (count selected-rows)
+                                        0 []
+                                        1 [x1-row]
+                                        [x1-row x2-row])
+                             ]
+
+                         (println "CHART -> SELECT INTERVAL: " interval)
+                         
+                         ;; вызов функции по реальному селектору
+                         (when on-selected-fn
+                           (on-selected-fn {:interval interval :selected-rows selected-rows})))
+
+
+                       (on-brushend-fn selected))))
 
               (-> chart-pano
                   (.selectAll "g.x.brush")

                  (.attr "y1" 0)
                  (.attr "x2" 0)
                  (.attr "y2" 0))
              
              #_(on-brushend-fn [nil nil])
              ))


                                 y-label
                                 title
                                 description
                                 on-selected-fn
                                 ]
                          :or   {main-width  d3c/full-screen-width
                                 main-height 300
