Friday, 15 July 2011

javascript - Driving dimple.js charts from div attributes -



javascript - Driving dimple.js charts from div attributes -

currently code total of little functions setup various dimple charts, usual boiler plate of svgs, charts, axes, etc. in many cases, these functions tied, one-to-one div tags chart drawn.

i'm thinking of setting scheme instead:

<div class="dimple-chart" margin-x="10% xaxistype="measure" xaxis="height" ...></div>

once i've figured out naming convention , set of attributes need, can utilize jquery (or whatever works) transform values in attributes , generate chart.

i don't web programming i'm curious if need build myself or if exists. if there no tools or libraries, there standards or best practices should aware of (such adding custom attributes div tags)?

i have seen templating languages allow basic info transforms, such filtering, mapping or reducing data. i'm interested in learning if such templating library may help in case.

you pretty much describing angular directives , in luck because set of angular directives exist dimple called angular-dimple http://esripdx.github.io/angular-dimple/

javascript jquery html dimple.js

No comments:

Post a Comment