Fault trees are used to conduct deductive failure analysis in which an undesired state of a system is analyzed using Boolean logic to combine a series of lower-level events.

This diagram uses a basic TreeModel and TreeLayout to layout nodes in a tree structure. The Diagram.nodeTemplate definition allows for text describing the undesirable states and, when necessary, a figure indicating an event/gate.

The visible property on some of the node template's Shapes is set based on whether a figure is chosen for the node in the Model.nodeDataArray. The nodes also display a TreeExpanderButton allowing for expanding/collapsing of subtrees. See the Intro page on Buttons for more GoJS button information.

Related to deductive failure analysis is root cause analysis, or RCA. See the fishbone layout extension page for a diagram format typically used in root cause analysis.

Diagram Model saved in JSON format:

GoJS Features in this sample

Tree Layout

This predefined layout is used for placing Nodes of a tree-structured graph in layers (rows or columns). For discussion and examples of the most commonly used properties of the TreeLayout, see the Trees page in the Introduction. More information can be found in the GoJS Intro.

Related samples


Buttons

GoJS defines several Panels for common uses. These include "Button", "TreeExpanderButton", "SubGraphExpanderButton", "PanelExpanderButton", "ContextMenuButton", and "CheckBoxButton". "ContextMenuButton"s are typically used inside of "ContextMenu" Panels; "CheckBoxButton"s are used in the implementation of "CheckBox" Panels.

These predefined panels can be used as if they were Panel-derived classes in calls to GraphObject.make. They are implemented as simple visual trees of GraphObjects in Panels, with pre-set properties and event handlers.

More information can be found in the GoJS Intro.

Related samples