npm.io
3.2.2 • Published 1 year ago

relatives-tree

Licence
MIT
Version
3.2.2
Deps
0
Size
117 kB
Vulns
0
Weekly
0
Stars
55

relatives-tree

A tiny library (~3.23 kB br) for calculating specific JSON data to family tree nodes and connectors.

Here is a demo app with React rendering.

import calcTree from 'relatives-tree';

const tree = calcTree(json, { rootId });

The nodes & the connectors are simple JS objects, so you can use any rendering layer.

Usage

Canvas example
React example (react-family-tree source code)
Solid example

JSON data examples.

Contributing

Please read this documentation before contributing.

Keywords