j-Diagram
Configuration:
parent {String}optional, a container with fixed height, can bewindow. Default value:parentelement.margin {Number}optional, a top/bottom margin together (default:0)marginxs {Number}optional, a top/bottom margin together forxsscreen widthmarginsmoptional, a top/bottom margin together forsmscreen widthmarginmdoptional, a top/bottom margin together formdscreen widthmarginlgoptional, a top/bottom margin together forlgscreen widthreverse {Boolean}, reverses diagram
Use it with <ui-component name="diagram">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<div style="width:600px;height:400px;border:1px solid #E0E0E0">
<ui-component name="diagram" path="items" class="invisible">
<script type="text/html">
<div style="padding:10px;{{ if id === 'AA' }}width:200px;height:150px{{ fi }}{{ if id === 'BC' }}height:100px{{ fi }}">{{ id }}</div>
</script>
</ui-component>
</div>
<script>
var items = [];
items.push({ id: 'A', items: [{ id: 'AA', items: [{ id: 'AAA' }] }] });
items.push({ id: 'B', items: [{ id: 'BA' }, { id: 'BB' }, { id: 'BC', items: [{ id: 'BCA' }] }] });
items.push({ id: 'C', items: [{ id: 'CA', items: [{ id: 'CAA' }] }, { id: 'CB' }, { id: 'CC' }, { id: 'CD', items: [{ id: 'CDA' }] }] });
</script>