Update directive for d3 loops (+ animation)