d3-template -> new plugin to create and render templates using D3's data binding mechanism

47 views
Skip to first unread message

Erik Stel

unread,
Jan 24, 2018, 5:33:04 PM1/24/18
to d3-js
d3-template is a D3 plugin to support templates using D3's data binding mechanism. This means you can use D3's familiar functionality directly on or with your templates. Apply transactions or add event handlers to template elements with access to the bound data. Render new data on a template thereby updating attributes, styles and text. Also new elements are added and superfluous elements are removed from repeating groups (D3's enter/exit). This works for both HTML as well as SVG elements.

Available as "d3-template-plugin" through npm: https://www.npmjs.com/package/d3-template-plugin

Or check out the GitHub page at: https://github.com/ErikOnBike/d3-template

Cheers,
Erik


Erik Stel

unread,
Feb 25, 2018, 7:25:34 AM2/25/18
to d3-js
Multiple filters are supported now as well as namespaces.

Erik Stel

unread,
Sep 30, 2018, 3:25:57 PM9/30/18
to d3-js
A major update to the d3-template plugin. It will now accept regular Javascript expressions. These expressions are D3 data functions (as described in the introduction of the D3 homepage). This means "d, i, nodes" are available as parameters and "this" is the node being rendered. This makes expressions more expressive and should make debugging easier (browsers will show the actual expression instead of some code deep down in the d3-template plugin).

Feel free to ask questions.
Reply all
Reply to author
Forward
0 new messages