A collection of convenience wrappers and utilities to speed up daily D3.js development.
d3-jetpack is a collection of convenience wrappers and utilities built on top of D3.js. It provides shorthand methods and helpers that reduce boilerplate code, simplify common tasks like DOM manipulation, attribute setting, and chart setup, making data visualization development faster and more readable.
Data visualization developers and frontend engineers who regularly use D3.js and want to write less repetitive, more concise code for creating charts and interactive graphics.
Developers choose d3-jetpack because it eliminates verbose D3 patterns, reduces typing, and provides intuitive utilities for everyday tasks, speeding up development without sacrificing the power and flexibility of D3.js.
🚀 Nifty convenience wrappers that speed up your daily work with d3.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Methods like `appendMany` condense multi-step data binding and element creation into single lines, as shown in the README where it replaces selectAll, data, enter, and append calls.
The `at` and `st` shorthands allow setting attributes and styles with camelCase keys, auto-hyphenating and appending units like px, reducing string quoting and typing effort.
`d3.conventions` quickly sets up SVG charts with margins and provides pre-configured scales and axes, while `drawAxis` automates axis drawing, following common D3 patterns without manual setup.
`attachTooltip` offers a lightweight way to add interactive tooltips that display data object properties, with built-in CSS for responsiveness, simplifying debugging and user interaction.
The full library adds overhead to your build; the README admits this by offering an 'Essential jetpack' option, indicating that some features may be unnecessary bloat for smaller projects.
It's tightly coupled with D3.js, so changes in D3 versions might break compatibility, and it's useless without D3 as a base, limiting its use in non-D3 environments.
Some utilities, like `d3.round`, are described in the README as 'fundamentally broken' but work 99% of the time, which could introduce subtle bugs in edge cases without warning.