;; this works to draw in an existing canvas
;; (def c (.getElementById js/document "myChart"))
;; (def ctx (.getContext c "2d"))
;; (def chart (new js/Chart ctx))
;; (.Radar chart (clj->js @app-state))
;; but how do i create a new canvas and set the data
;; that i want it to render
(defn hello-world []
[:canvas
(fn [this]
(let [ctx (.getContext this "2d") chart (new js/Chart ctx)]
(.Radar chart (clj->js @app-state))))]
)
;; bonus: the chart some times requires a reload to adjust its
;; configuration
;; thanks for your consideration and time
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.