score:5

Accepted answer

You need to pass a type into d3.line

For example if your model interface is called Data

interface Data {
   x: number;
   y: number;
}

Then use

d3.line<Data>()
    .x(d => scaleX(d.x))
    .y(d => scaleY(d.y));

That should solve question #1

score:0

The answer to #2 is that I needed to set the ViewEncapsulation to none for the angular component.


Related Query