I help manage a project that integrates some of the visualizations in D3. In our specific example, we are making a pie chart using a regular D3 chart with a Sankey chart. The affect of this is to create something like:

The purpose of the development is to try to keep it as modular as possible, so the very first step was to create an update pie chart that can be used autonomously or connected to another visualization. This is currently encapuslated in pieObject, which looks something like this:
var pieObject = function( d, target ){
var pie = {};
pie.update = function(data) {
};
};
Where there is a little confusion, in the visualization of the tree, when I need to start processing updates. Here's how to add a new pie:
sankey.nodes(data.nodes)
.links(data.links)
.layout(32);
var node = svg.append("g")
.selectAll(".node")
.data(data.nodes)
.enter()
.append("g")
.attr("class", "node")
.attr("transform", function (d) { return "translate(" + d.x + "," + d.y + ")"; });
.each( function( d ) {
var pie = new pieObject( d, this );
})
, , node, , pieObject? , , , ?
- pieObject
d - pieObject JavaScript
d
№1. JSON (, JSON + ), , sankey.nodes(data.nodes).links(data.links).layout(32);, , d?
JSFiddle, . , , , :
1- # 214 - Sankey,
215- # 451 -
453- # 475 -
, , , - # 129- # 149