Hello I'm trying to write some d3.js code inside of an Angular 2 components. For the visualization to work I'm trying to bind some data to the svg elements themselve using the "this" accessor inside the d3.js function
slices.transition()
.attrTween("d", (d: DataSet) => {
console.log((<any>this));
// do something with the this variable
});
Now the problem is that the "this" variable is pointing to the Angular 2 component object. I'm trying to access the svg element which is creates by d3.js.
Is there any other way to access this variable?