Merge branch 'master' into development

Conflicts:
	nv.d3.min.js
master-patched
Tyler Wolf 11 years ago
commit b682cf6ad3

@ -3171,18 +3171,18 @@ nv.models.indentedTree = function() {
//============================================================
var idx = 0;
function chart(selection) {
selection.each(function(data) {
var i = 0,
depth = 1;
var depth = 1,
container = d3.select(this);
var tree = d3.layout.tree()
.children(function(d) { return d.values })
.size([height, childIndent]); //Not sure if this is needed now that the result is HTML
chart.update = function() { selection.transition().call(chart) };
chart.container = this;
chart.update = function() { container.transition().duration(600).call(chart) };
//------------------------------------------------------------
@ -3194,6 +3194,10 @@ nv.models.indentedTree = function() {
var nodes = tree.nodes(data[0]);
// nodes.map(function(d) {
// d.id = i++;
// })
//------------------------------------------------------------
// Setup containers and skeleton of chart
@ -3234,12 +3238,12 @@ nv.models.indentedTree = function() {
// Update the nodes…
var node = tbody.selectAll('tr')
.data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; }) }, function(d) { return d.id || (d.id == ++i)});
// .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
.data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
//.style('display', 'table-row'); //TODO: see if this does anything
node.exit().remove();
node.select('img.nv-treeicon')
.attr('src', icon)
.classed('folded', folded);
@ -3290,7 +3294,6 @@ nv.models.indentedTree = function() {
});
node
.order()
.on('click', function(d) {

5
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

@ -22,18 +22,18 @@ nv.models.indentedTree = function() {
//============================================================
var idx = 0;
function chart(selection) {
selection.each(function(data) {
var i = 0,
depth = 1;
var depth = 1,
container = d3.select(this);
var tree = d3.layout.tree()
.children(function(d) { return d.values })
.size([height, childIndent]); //Not sure if this is needed now that the result is HTML
chart.update = function() { selection.transition().call(chart) };
chart.container = this;
chart.update = function() { container.transition().duration(600).call(chart) };
//------------------------------------------------------------
@ -45,6 +45,10 @@ nv.models.indentedTree = function() {
var nodes = tree.nodes(data[0]);
// nodes.map(function(d) {
// d.id = i++;
// })
//------------------------------------------------------------
// Setup containers and skeleton of chart
@ -85,12 +89,12 @@ nv.models.indentedTree = function() {
// Update the nodes…
var node = tbody.selectAll('tr')
.data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; }) }, function(d) { return d.id || (d.id == ++i)});
// .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
.data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
//.style('display', 'table-row'); //TODO: see if this does anything
node.exit().remove();
node.select('img.nv-treeicon')
.attr('src', icon)
.classed('folded', folded);
@ -141,7 +145,6 @@ nv.models.indentedTree = function() {
});
node
.order()
.on('click', function(d) {

Loading…
Cancel
Save