d3 up && leger refactor