TODO: add d3 custom directives for AngularJS