This example uses d3Kit with AngularJS through angular-d3Kit-adapter.
d3Kit factory helps you create a reusable chart. angular-d3Kit-adapter converts the chart into an angular directive in one line.
angular.d3KitAdapter.plug(module, 'bubbleChart', BubbleChart);
Then you can use this tag.
<bubble-chart chart-data="bubbles" chart-on-bubble-click="handleClick"></bubble-chart>
In bubbleChart.js, a custom event "bubbleClick" is defined. This event becomes an attribute chart-on-bubble-click
that you can bind to an event handler automatically.
Try it by
Modified http://d3js.org/d3.v3.min.js to a secure url
Updated missing url https://rawgit.com/twitter/d3kit/master/dist/d3kit.min.js to https://cdn.jsdelivr.net/gh/twitter/d3kit/dist/d3kit.min.js
Updated missing url https://rawgit.com/kristw/angular-d3kit-adapter/master/dist/angular-d3kit-adapter.min.js to https://cdn.jsdelivr.net/gh/kristw/angular-d3kit-adapter/dist/angular-d3kit-adapter.min.js
https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js
https://d3js.org/d3.v3.min.js
https://rawgit.com/twitter/d3kit/master/dist/d3kit.min.js
https://rawgit.com/kristw/angular-d3kit-adapter/master/dist/angular-d3kit-adapter.min.js