I'm trying to animate the removal of a tree node. As I move between different treemaps, I can't seem to get the transition to work ok. I currently have code like this
cell.exit()
.transition()
.duration(500)
.call(animateCellRemove)
.remove();
function animateCellRemove(selection) {
selection
.attr('scale', function(d) {
return "scale(" + d.dx/2 + "," + d.dy/2 +")";
});
}
Is it possible? Am I doing something wrong?
Did you mean selection.attr("transform", …)
?