Skip to main content

lineConfig

Description​

Optional. An object with default configuration for the connector lines

Usage​

lineConfig?: {
lineType?: "dash" | "line",
lineGap?: number,
connectType?: "elbow" | "straight" | "curved" // the "curved" type is used only in the mindmap mode
};

Parameters​

The lineConfig object contains the following parameters:

  • lineType - (optional) the default type of a connector line. The value is applied, if the line object doesn't contain the "type" property
  • lineGap - (optional) sets the distance to the right-angled bend of a connector line
  • connectType - (optional) sets the connection type of the lines: "elbow" | "straight" | "curved" (the "curved" type is used only in the mindmap Diagram mode). The value is applied, if the line object doesn't contain the "connectType" property
info

The values of the lineType and connectType settings will be applied, if the line object doesn't contain the identical ones.

Default config​

lineConfig: {
lineType: "line",
lineGap: 10
}

The connectType parameter has the following default values:

  • "elbow" - for the default and org chart Diagram modes
  • "curved" - for the mindmap Diagram mode (this type is used only in the mindmap Diagram mode)

Example​

const diagram = new dhx.Diagram("diagram_container", {
type: "default",
lineConfig: {
lineType: "dash",
lineGap: 50,
connectType: "straight"
},
// other config parameters
});

The result of applying the lineGap property is shown in the image below:

Related sample: Diagram. Default mode. Activity diagram

Change log:

  • The connectType parameter is added in v6.1
  • The lineGap parameter is added in v5.0 (check the Migration article)
  • Added in v4.2

Related article: Setting connections between shapes