Angular 2 typescript d3 type issue: Property 'x' does not exist on type '[number, number]'
Here is the solution. I need to use generics:
As said, it's a TypeScript interpretation issue. I simply fixed it using brackets notation to access the property. Just like this:
let line = d3.line()
.x(function (d) {
return x(d['date']);
})
.y(function (d) {
return y(d['temp']);
});