             [om-tools.core :refer-macros [defcomponent]]
             [sablono.core :as html :refer-macros [html]]
             [cljs.core.async :refer [put! <! >! chan timeout close!]]
-            [searchbot.es :refer [es-agg filtered-agg get-agg-buckets flatten-agg-buckets]]
+            [searchbot.es :refer [es-agg filtered-agg]]
             [searchbot.input.labels :as labels]
             [searchbot.charts :refer [es-chart]]
             [searchbot.chart.metricgraphics :as mg]))

                 :make-agg-query #(->query {:agg-terms ((:get-agg-terms (om/get-state owner)))
                                            :sub-aggs (:sub agg)
                                            :size (:size (om/get-state owner))
                                            :show-dimensions? (:show-dimensions? (om/get-state owner))
                                            :filters (ref-state :filters)
                                            :default-filter (get-in (es-settings) [:default :filter])})
                 :value-path (apply vector (map keyword value-path))

                 :svg nil
                 :parsets-data []
                 :highlighted {}
                 :show-dimensions (get-in opts [:dimensions :show])}))
  (will-mount [_]
              (do-parsets-agg owner))
  (render-state [_ {:keys [parsets-agg get-agg-terms parsets-data show-dimensions]}]
