ForgeKomponenter
sv

Komponenter

j-Diagram

jComponent 20 · jcomponent@20 component Exempel laddat med jComponent 20

Konfigurera:

  • parent {String} Alternativt, en behållare med fast höjd kan vara windowFörfalskad värde: parent Element är.
  • margin {Number} valfritt, en topp/bottom marginal tillsammans (default: 0)
  • marginxs {Number} valfritt, en topp/bottom marginal tillsammans för xs skärmbredd
  • marginsm valfritt, en topp/bottom marginal tillsammans för sm skärmbredd
  • marginmd valfritt, en topp/bottom marginal tillsammans för md skärmbredd
  • marginlg valfritt, en topp/bottom marginal tillsammans för lg skärmbredd
  • reverse {Boolean}, omvänt diagram

Använd den med <ui-component name="diagram">När komponenten ännu inte är laddad, jComponent Ladda ner den första gången från adressen i DEF.fallback (en av Componentator Författare: Peter Širka. källa: The Componentator Komponenterna i lager, MIT licens.

example.html
<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>