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.
On Wednesday, April 12, 2017 at 8:30:34 AM UTC+10, Robert Werner wrote:
>
> I'm hoping to get an April 2017 update on what might be considered the
> best practices to use Angular 2 with D3.
>
> For simplicity's sake, imagine that you are responsible for building an
> Angular 2 app that has a series of charts in it: bar, line, pie, scatter
> plot, etc. Imagine further that you want these charts to be very dynamic
> with the user interacting with them.
>
> If this were your assignment, how much would you use D3 vs. Angular?
>
> I realize this is a very open-ended question but I'm trying to get some
> insight from those who have already worked with these two technologies.
>
> Thank you,
>
> Robert
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.