Implement primitive d3 functionality in angular