UNPKG

pm4js

Version:

Process Mining for Javascript

23 lines 876 B
<html> <head> <script src="../../pm4js/utils/browser/jquery.min.js"></script> <script src="http://viz-js.com/bower_components/viz.js/viz.js"></script> <script src="../../dist/pm4js_latest.js"></script> </head> <body> <div id="container"> </div> <script type="text/javascript"> let root = new ProcessTree(null, ProcessTreeOperator.SEQUENCE, null); let child1 = new ProcessTree(root, ProcessTreeOperator.EXCLUSIVE, null); let child2 = new ProcessTree(root, null, 'label of the visibile leaf'); let child3 = new ProcessTree(root, null, null); root.children.push(child1); root.children.push(child2); root.children.push(child3); let gv = ProcessTreeVanillaVisualizer.apply(root); let svgXml = Viz(gv, { format: "svg"}); document.getElementById("container").innerHTML = svgXml; </script> </body> </html>