d3-mindmap
v1.0.0
Published
generate mindmap from json
Downloads
30
Readme
d3-mindmap
A JavaScript library for generating mind maps using D3.js.
Installation
To install d3-mindmap, use the following command:
npm i d3-mindmap
Usage
import getRender from 'd3-mindmap';
const data = {
"name": "Root",
"children": [
{
"name": "Child 1",
"children": [
{"name": "Grandchild 1"},
{"name": "Grandchild 2"}
]
},
{
"name": "Child 2",
"children": [
{"name": "Grandchild 3"},
{"name": "Grandchild 4"}
]
}
]
};
getRender(document.body)(data);
Checkout a live demo of d3-mindmap here
License
d3-mindmap is licensed under the MIT License.