Using d3.js in Angular 2 App

In an Angular 2 app, I need to create a graph using D3.js.

In order to get the D3 JS files, I did a "npm install d3". however, it created lots of folders inside node_modules. I am not able to make out which ones to use.

In the past (in an Ext JS application), I have just included d3.js in the script tag and that made 'd3' available for me to use.

Is that not the case when using node modules? What is the best way to use d3 with angular 2?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
I have not used d3 with angular but did an npm install of d3 - looks like what you are looking for is

node_modules\d3\build\d3.js or

One option is to use the above - I have seen some samples that get d3 directly from CDN example
<script src="" charset="utf-8"></script>

It comes down to how you are packaging and deploying your app.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.