sets configuration for autoplacement

object autoplacement;


var diagram = new dhx.Diagram("diagram_container", {
    autoplacement: {
        mode: "edges",
        graphPadding: 100

Related samples


The autoplacement property works for Diagram and Diagram Editor but does not work for Organizational Chart and Org Chart Editor. The autoplacement property does not work if you use groups or swimlanes.

The autoplacement object can contain the following options:

  • mode - (string) the mode of connecting shapes, "direct" (by default) or "edges"
  • graphPadding - (number) sets the distance between unconnected diagrams, "200" by default

Modes of connecting shapes

    "direct" mode
    Connectors are aligned "from center to center"; they are straight and diagonal.
    "edges" mode
    Connectors are aligned "from side to side"; they are straight and 90-degree curved.
See also
Change log

added in v3.0

Back to top