modularized d3 graph. added axes and transition