If you want to use the default operator:
data = [
{ "id": "Euler" },
{
"id": "Lagrange",
"parentIds": ["Euler"]
},
{
"id": "Fourier",
"parentIds": ["Lagrange"]
},
{
"id": "Poisson",
"parentIds": ["Lagrange", "Laplace"]
},
{
"id": "Dirichlet",
"parentIds": ["Fourier", "Poisson"]
},
{ "id": "Laplace" }
] as const;
const builder = stratify();
const grf = builder(data);
create a new Stratify with default settings
Stratify operators create graphs from data that are in a tabular format, with references to ids of their parents. By default it expects node data to have a string
id
property andparentIds
property with an iterable of parent ids.