Skip to main content

Home > @jsplumbtoolkit/core > Graph > getDiameter

Graph.getDiameter() method

Returns the diameter of the Graph.

Signature:

getDiameter(dontUseMax?: boolean): number;

Parameters

ParameterTypeDescription
dontUseMaxbooleanWhether or not to return Infinity if there is at least one pair of nodes for which there is no available path. Defaults to false.

Returns:

number

Diameter of the Graph.