D3 snippets wrapped for use with AngularJS