File tree Expand file tree Collapse file tree 1 file changed +20
-21
lines changed
src/clojure_norway/meetup_2025_12 Expand file tree Collapse file tree 1 file changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -470,32 +470,31 @@ wav-format
470470 bufimg/tensor->image)
471471
472472(defn animated-echarts [specs]
473- (kind/reagent
474- ['(fn [specs]
475- (let [*i (reagent.core/atom 0 )]
476- (fn []
477- ^{:key @*i}
478- [ :div
479- [:div {:style {:height " 400px" }
480- :ref (fn [el]
481- (when el
482- (let [chart (.init js/echarts el)]
483- (.setOption chart
484- (clj->js
485- (specs (rem @*i (count specs))))))))}]
486- (js/setInterval #(swap! *i inc) 1000 )
487- ; ; Include this to force component update:
488- [:p {:style {:display :none }}
489- (hash @*i)]])))
490- specs]
491- {:html/deps [:echarts ]}))
473+ [ (kind/reagent
474+ ['(fn [specs]
475+ (let [*i (reagent.core/atom 0 )]
476+ (fn []
477+ ^{:key @*i}
478+ [ :di
479+ [:div {:style {:height " 400px" }
480+ :ref (fn [el]
481+ (when el
482+ (let [chart (.init js/echarts el)]
483+ (.setOption chart
484+ (clj->js
485+ (specs (rem @*i (count specs))))))))}]
486+ (js/setInterval #(swap! *i inc) 1000 )
487+ ; ; Include this to force component update:
488+ [:p {:style {:display :none }}
489+ (hash @*i)]])))
490+ specs]
491+ {:html/deps [:echarts ]})] )
492492
493493(let [n 100 ]
494494 (-> normalized-spectrogram
495495 (tensor/transpose [1 0 ])
496496 (tensor/slice 1 )
497- (->> (take 20 )
498- (mapv (fn [spectrum]
497+ (->> (mapv (fn [spectrum]
499498 {:xAxis {:show false
500499 :data (vec (range 100 ))}
501500 :yAxis {:show false }
You can’t perform that action at this time.
0 commit comments