I'm trying to define chart components for Om in order to create dashboards. For 
the state management and propagation Om feels right and for the charting my 
idea is to use d3.js (via strokes, a clojurescript adapter).

I have started by translating the code for 
http://10consulting.com/2014/02/19/d3-plus-reactjs-for-charting/ to use Om 
instead of React.js and strokes instead of d3.

The translation is more or less straightforward but something in the approach 
does not feel right. From d3 I only use scales and the data binding part is 
realized by om. For simple bar charts (as those in the example) this approach 
works, but to create the axis with labels I'll have to rewrite most of the code 
in d3 but using om.dom instead accessing the read DOM apis.

Here is my question: is it possible to access and work on the real DOM node 
from an Om component? 

My idea is to leave Om manage state propagation and re-rendering until the SVG 
container (the node than contains the chart). If it has to be re-rendered 
(because tha data or teh size has changed), leave the re-rendering of its 
children (e.g. rectangles for the bars, text for the labels, etc.) to d3 data 
binding. 

Is it possible to do that? Is it sensible? 

Thanks !!

Juan Manuel 

-- 
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 http://groups.google.com/group/clojurescript.

Reply via email to