1.0 KiB
1.0 KiB
fa-diagrams
(WIP) SVG diagrams built from Font-Awesome icons
How to use (theorically)
const diag = require('fa-diagrams');
const data = {
options: {
font: 'times'
},
nodes: [
{
name: 'node1',
icon: 'server',
bottom: {text: 'myserver' },
top: {icon: 'node'}
},
{
name: 'node2',
icon: 'globe',
bottom: {text: 'world'}
}
],
links: [
{
from: 'node1',
to: 'node2',
bottom: {text: 'Hello World!'}
}
]
};
const svg = diag.compute(data); // string containing xml data
Will produce the following diagram :
