Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Highcharts element for Hoplon without the need to destory and
- ;; re-initialize on changes.
- (defn update-chart
- [chart options]
- (.update (.highcharts chart) (clj->js options) true true))
- (defelem chart
- [{:keys [options] :as attr}]
- (with-let [elem (div :class (str (gensym)) (dissoc attr :options))]
- (let [chart (.highcharts (js/jQuery elem) (clj->js {}))]
- (cell= (update-chart chart options)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement