For a project I'm working on, I found an interesting library that I would like to import, but I don't know how.
The project is based on Angular 2, it runs through a SPA template through ASP.NET Core (in case it matters) and it gets built by webpack.
Until now I installed both D3 and EventDrops through NPM, than imported them into my component.ts file like this:
import * as d3 from 'd3';
import * as EventDrops from 'event-drops';
First I tested the D3.js import by adding:
ngOnInit() {
var eventDropsChart = d3.select("#visual");
console.log(eventDropsChart);
...
}
It seems to work, so I tried the next step that is:
var eventDropsChart = d3.chart.eventDrops();
But it does not work, because
TS2339: Property 'chart' does not exist on type 'typeof "mypath/node_modules/@types/d3/index"'
Could you please help me?
Thank you very much!