본문 바로가기

엉터리 개발 이야기

연습

반응형

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;
}
}
});
});
});


반응형

'엉터리 개발 이야기' 카테고리의 다른 글

docker cli  (0) 2018.07.11
Docker Build 명령어  (0) 2018.07.09
d3 select 연습  (0) 2018.06.19
[MySQL] String to Datetime  (0) 2018.06.19
docker  (0) 2018.06.09