Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • graph - the graph to be layouted in our JSON Format.
  • options - a JSON object containing layout options that should be used for every hierarchy level of the graph. The same effect can be achieved by specifying the properties for every compound node, however, using the options object offers a more convenient way. Further information on available layout options can be found here.
  • success(layouted) - a function to be called upon success, the layouted graph is passed as argument.
  • error(obj) - a function to be called if an error occurs, an object is passed as argument which contains a text field with further information about the error.

Dedicated KlayJS Options

We offer some options that have influence of the behavior of the JavaScript interface. These options are listed below.

  • intCoordinates - when set to true all calculated layout coordinates (by default doubles) are cast to an integer value.

Example

Below is small example that executes layout on a small graph. Upon success the returned JSON is printed to the console and added to the body of the document.

...