Creating the Diagram object

The Diagram object is a Dijit widget that allows you to display a graph from a Dojo data store and apply a graph layout to arrange the nodes and links.
To create a diagram declaratively in the page markup:
  1. Import the required definition file, as for all Dijit widgets:
    dojo.require("ibm_ilog.diagram.widget.Diagram");
  2. Instantiate the Diagram widget in a div element setting the dojoType attribute to ibm_ilog.diagram.widget.Diagram:
    <div id="canvas" dojoType='ibm_ilog.diagram.widget.Diagram' style="width:900px;height:700px" />