typeConfig

optional, defines the direction of the shapes in the mind map

object typeConfig;

Example

const diagram = new dhx.Diagram("diagram_container", { 
    type: "mindmap",
    typeConfig: {
        direction: "right",
    },
});

Related samples

Details

If you don't apply the config, the child shapes of the mind map will be arranged automatically according to the main algorithm.

The property does not work in the Mind Map Editor.

The typeConfig object has two options:

  • direction - (string) optional, sets the direction of the graph:

    • "left" - sets child shapes of the graph to the left of the root shape
    • "right" - sets child shapes of the graph to the right of the root shape
  • side - (object) optional, sets the mandatory direction for the specified child shapes. The object contains a set of key:value pairs where key is the direction of the shapes (left, right) and value is an array with the ids of the shapes.

const diagram = new dhx.Diagram("container", { 
    type: "mindmap",
    typeConfig: {
        side: {
            left: ["2", "3"],
            right: ["4", "5"],
        }
    }
});

The other child shapes that are not set in the side option will be arranged automatically according to the main algorithm.

You can use either the direction option set to "left"/"right" or the side option.

Change log

added in v3.1.

Back to top