4 ms·
I agree with you 100% re: mixing generic styling (i.e., the bar height/color) with the actual data-driven attributes (the bar width). The styling is just inline
by lynaghk 14y ago
I agree with you 100% re: mixing generic styling (i.e., the bar height/color) with the actual data-driven attributes (the bar width).
The styling is just inlined in these demos because I wanted something that worked immediately out of the box from a single file.
In production we use SASS to generate CSS styles for visualizations.
The question of how to separate data-driven attributes (the top/left positions for points on a scatterplot) vs. incidental layout considerations (the ordering of bars on a bar chart or grid positions of small multiples) is something I've been thinking about for some time.
Ideally I can use C2 for the former and something like constraint solvers for the latter.
See:
https://github.com/lynaghk/cassowary-cljs-demo/blob/master/src/cljs/cassowary-cljs-demo/core.cljs https://github.com/lynaghk/cassowary-cljs-demo/blob/master/s...
Getting everything tided up for public release was actually on my agenda for this weekend, but someone found the github and posted to HN early =P
- nilliams 14y agoAh great, good to hear it! And yes using SASS sounds like a definite win :)