set up d3 in angular directive