OK, this is how I do to my angular & d3.js
Firstly in your index.html and d3.js as :
<script src="js/d3.v3.min.js"></script>
Secondly in your components/class/file where d3.js is going to use add this after your import
declare var d3: any;
Thirdly copy and rename your existing d3.js function
Finally your need manually change "var" to "let" in your d3.js code (this is important) and there are other changes you will be aware when your compile your code.
The good thing about doing this way is you are making min. changes to your existing d3.js function.
This won't be the best way of doing it, but I am too busy to find out.