This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-19
Channels
- # admin-announcements (2)
- # aws-lambda (3)
- # beginners (66)
- # boot (61)
- # cider (1)
- # cljs-dev (17)
- # clojure (100)
- # clojure-austin (4)
- # clojure-brasil (1)
- # clojure-canada (8)
- # clojure-quebec (6)
- # clojure-russia (48)
- # clojure-sg (6)
- # clojure-spec (37)
- # clojure-uk (61)
- # clojure-ukraine (2)
- # clojurescript (80)
- # core-async (13)
- # cursive (20)
- # datascript (37)
- # datomic (2)
- # defnpodcast (4)
- # emacs (5)
- # funcool (3)
- # hoplon (11)
- # jobs (7)
- # juxt (26)
- # lein-figwheel (48)
- # leiningen (3)
- # luminus (3)
- # om (34)
- # om-next (5)
- # onyx (5)
- # protorepl (6)
- # re-frame (10)
- # reagent (9)
- # rethinkdb (16)
- # ring-swagger (5)
- # spacemacs (14)
- # specter (54)
- # untangled (36)
- # vim (75)
- # yada (1)
oh hi @jjttjj; quick question - I saw you were working on integrating amcharts into cljsjs; did you have any luck in the end?
@jjttjj: I don't think there are any h/ui form examples, but I use this:
(form :sh+ 450 attrs :fc c/black
:submit #(state/sign-in (:email %) (:pwd %))
(app.logo/sign-in)
(mui/field-group :sh (r 1 1)
(elem :fc c/red-400
(cell= (and state/sign-in-error
(.-message state/sign-in-error))))
(field :key :email :label "Email address")
(field :key :pwd :label "Password" :type "password"))
(elem :av :middle :ah :center :stuck_out_tongue: 8 :g pad-sm :sh (r 1 1)
(submit button-style (mui/anchor) :label "SIGN IN"))
elems)))
and it works. field-group is just a header.Note that master
has an error in wrap-submit
; you need to change one of the submit
s to submit'
or something
like this:
(defn wrap-submit [ctor]
"set up a form context"
(fn [{label :label submit' :submit :as attrs} elems]
{:pre []} ;; todo: validate
(let [data *data*
submit *submit*]
(with-let [e (ctor (dissoc attrs :label :submit) elems)]
(.addEventListener (mid e) "click" #((or submit' @submit) @data))
(bind-in! e [in .-type] "submit")
(bind-in! e [in .-value] label)))))
@adamw: I never did get amcharts working with cljsjs. I can't quite remember the reason why, it might have just been being totally new to cljsjs, but also not being fully confident in if I was even dividing amcharts up correctly, I cared mainly about AmStock but I remember the AmX suite being broken up in a way that wasn't immediately obviously friendly with cljsjs. At some point I tried highcharts which just worked out of the box with cljsjs already and never really looked back. Sorry I can't be of more help there I'll check when I wake up in the morning if I still have any remnants of my AmCharts cljsjs attempts.
@jjttjj: no worries, thanks! Was evaluating both and we are using an charts for the static website so seemed sensible to do the same for the app. If high charts is best then I guess it's the easy solution:slightly_smiling_face:
@adamw: my inclination would be to use a subset of d3.js rather than going for the highcharts wrappers.
i used highcharts some time ago, but ultimately found i had more control working directly with d3; it is a well-desiged api with lots of documentation and examples.