For my angular2 component, I am using the block provided in this link (a simple line chart): https://bl.ocks.org/d3noob/6f082f0e3b820b6bf68b78f2f7786084
I have successfully completed the following steps:
npm install d3 --save
npm install @types/d3 --save
To load d3.min.js and d3.node.js through SystemJS, I have included my component.ts file below.
// code is here
This excerpt from @types/d3-shape/index.d.ts covers the Line portion:
// line interface details are mentioned here
The graph is loading, but the line path is filled up.
Here's a plunker for reference: http://plnkr.co/edit/KwcgHsc7aPpE1tjv8mlb?p=preview
Question 1:
Why do I encounter these TypeScript errors?
error TS2339: Property 'x' does not exist on type '[number, number]'.
error TS2339: Property 'y' does not exist on type '[number, number]'.
Question 2:
Why isn't my :host(.timeline)
style being applied?