This sample shows a "fishbone" layout of a tree model of cause-and-effect relationships. The layout is defined in its own file, as FishboneLayout.js. When using FishboneLayout the diagram uses FishboneLink in order to get custom routing for the links.

The buttons each set the Diagram.layout within a transaction.