datavis

2016-08-01T16:00:19.000014Z

FWIW, I'm leaning toward something that just creates a Clojure map, converts it to js (hopefully via clj->js), then leaves it to Vega to evaluate it

2016-08-01T16:00:43.000015Z

like gyptis does (https://github.com/dvdt/gyptis)

eggsyntax 2016-08-01T16:10:13.000017Z

Not a bad option 🙂

eggsyntax 2016-08-01T16:13:01.000018Z

I guess it depends how much you plan to use it. If it's more than a little, it's not too bad usually to write a thin cljs wrapper over a js lib.

eggsyntax 2016-08-01T16:13:37.000019Z

That's the approach I took with the Mathbox lib, which is another JS graphics lib. If you want to get an idea of what's involved, take a look at https://github.com/eggsyntax/cljs-mathbox

eggsyntax 2016-08-01T16:14:03.000021Z

The actual wrappers (which was most of the work) are in https://github.com/eggsyntax/cljs-mathbox/tree/master/src/cljs_mathbox

eggsyntax 2016-08-01T16:14:53.000025Z

A lot of it's stuff like this:

(defn bezier [mb-instance opts-map]
  (. mb-instance bezier (clj->js opts-map)))
which is a bit tedious, but not hard.

2016-08-01T16:15:13.000026Z

that looks interesting

eggsyntax 2016-08-01T16:15:39.000027Z

& if you have to do a bunch of them, you could write a fn-to-js-method macro or something...

2016-08-01T16:17:49.000028Z

my JS fu is not as good as I'd like it to be, so I favor something simple until I get a chunk of time to read up on all the frontend stuff I don't currently know

eggsyntax 2016-08-01T16:18:13.000029Z

Totally.