This repository has been archived by the owner on Nov 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Home
kwongsuphasawat edited this page May 31, 2015
·
29 revisions
d3Kit is a lightweight scaffold for building components with d3.js. After working on various projects, we found ourselves implementing the same block of code over and over to set the dimension, dispatch events, manage auto-resizing, etc. These repetitive tasks are extracted into d3Kit for everyone's sake.
Here are a few things d3Kit provides for you:
Creating a skeleton does all the basic groundwork for you before creating any chart. Groundwork tasks include, but not limited to:
- Setup the chart according to d3's margin convention
- Support auto-resizing
- and many more...
High-level description
A utility for creating layers from a given config. If you have a habit of creating many <g>
to layer your visual elements. This utility will let you create nested layers easily in one command. For example,
var layers = new d3Kit.LayerOrganizer(d3.select('svg'));
layers.create([{'highlight': 'cursor'}, {'graph': ['axis','content']}]);
Please see API Reference for more details