automatically arranges connected diagram shapes in the hierarchical structure

void autoPlace(object config);


configobjectoptional, an object with configuration settings of the autoplacement. If not specified, the default settings will be applied.


var diagram = new dhx.Diagram("diagram");;
    mode: "edges"

Related samples


The autoPlace method works for Diagram not Org Chart.

The method can take a config object as a parameter. The object contains two optional properties:

  • 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