curves and areas now work

also d3 helpers have been refactored into a service