Question

There are a number of open source products which work on XSD to create diagrams, but more importantly, I need something which simply works on XML and draws a decent hierarchical diagram, more like an Org chart!

Thanks in advace, Biju

Était-ce utile?

La solution

You can use GetOrgChart. Note that the xml file needs to be hosted under the same domain as the html.

Demo

Xml file

Here is an example: .xml

<people>
<person name="Boss" phone="079 0616 3133" image="images/p-16.jpg" addres="58 Copthorne Way, CAMER, DA13 3GN" website="CardTribune.co.uk">
<person name="Jacob Henderson" phone="078 4750 2362" image="images/p-15.jpg" dateOfBirth="December 11, 1943" userName="Stivider"/>
<person name="Mason Siebenhaar" phone="079 3176 6188" image="images/p-14.jpg"/>
<person name="Manuel Beekman" phone="079 0346 5377" image="images/p-10.jpg" CVV2="939"/>
<person name="Barbara Mathis" phone="078 3998 6738" image="images/p-9.jpg" GUID="13a75b86-b9a1-40aa-8972-31a4ed573ab6">
<person name="Maude Hurst" phone="070 2655 0635" image="images/p-1.jpg" CVC2="108"/>
<person name="Margaret Hawkins" phone="070 6786 6047" image="images/p-7.jpg" mail="MargaretJHawkins@teleworm.us"/>
<person name="Jean Pitts" phone="078 6013 1878" image="images/p-5.jpg" mail="JeanWPitts@jourrapide.com"/>
</person>
<person name="Melissa Byler" phone="070 0640 9727" image="images/p-3.jpg" NINO="ZM 64 97 42 A"/>
<person name="Virgil Lee" phone="078 7598 6890" image="images/p-2.jpg" Visa="4556 4749 0420 0422"/>
<person name="Anthony Andres" phone="077 2935 5027" image="images/p-4.jpg" MasterCard="5166 1409 9098 3242"/>
</person>
</people>

.js

    $("#people").getOrgChart({      
        theme: "deborah",
        primaryColumns: ["name", "phone"],
        imageColumn: "image",
        dataSource: "load-from-xml.xml"
    });
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top