I came across JS library which seems to be perfect for me
https://www.graphdracula.net/
I installed needed libraries using npm - npm i raphael graphdracula. It created folders in node_modules and also updated package.json as expected
Now when I try to create graph
var g = new Dracula.Graph();
compiler complains
Cannot find name 'Dracula'
the question is how can I import library so typescript / angular knows about it ? IDE is not very helpful. I know I have to import it in my module by I don't know how to find out what to import
import { ?? } from '??';
When you install js. library which is not written in typescript (does not have type definition *.d.ts) you need to import it like this:
then you can use it
You can read more about importing 3rd party libraries e.g. here: https://hackernoon.com/how-to-use-javascript-libraries-in-angular-2-apps-ff274ba601af