C2
← Back to Kevin's homepagePublished: 2016 July 20C2 is a Clojure/ClojureScript data visualization library inspired by Mike Bostock’s D3.js.
See 2012 Clojure/West talk (theory) and 2012 Strange Loop talk (case study), Github repo.
C2 emphasized building a graphic via composition of pure functions, with all imperative DOM manipulation happening under-the-hood. Work on C2 led me to write:
- Singult: a data->DOM template library (now deprecated in favor of React.js)
- Reflex: a primitive dataflow system that inspired Reagent (though I now prefer alternative propagation methods over implicit dataflow, especially for large applications)
- CLJX, a Clojure/ClojureScript code sharing tool, now deprecated in favor of the
.cljc
reader syntax introduced by the Clojure core team in Clojure 1.7
I now rarely use anything besides C2’s scale functions, as React.js and ClojureScript wrappers such as Rum provide a superset of C2’s rendering semantics.