억삼이 2018. 6. 25. 17:37
반응형

var array1 = d3.select('.nv-groups').selectAll('.nv-group').each(function (e) {

    d3.select(this).selectAll('rect').each(function(e1, idx) {

//console.log(idx + ', ' + e1.y);

//console.log(d3.select(this));

console.log(e1);

    });

});


let smallYRect = [];
svg.select('g.nv-groups').selectAll('g.nv-group').each( function (d, i) {
d3.select(this).selectAll('rect').each(function(d1, i1) {
d3.select(this).select(function () {
if(i === 0) {
smallYRect[i1] = this;
} else {
if(smallYRect[i1].y.baseVal.value > this.y.baseVal.value) {
smallYRect[i1] = this;
}
}
});
});
});


반응형