Skip to content

Graphical Representation

Visual representation is a core part of the Latch-X framework, providing intuitive graph-based views of system models through automatically generated diagrams. The framework renders models as interactive graphs using industry-standard notation and customizable styling.

Overview

Latch-X automatically converts your YAML model definitions into visual diagrams using three primary layout types:

  • FTA (Fault Tree Analysis): Top-down view showing failure propagation
  • RBD (Reliability Block Diagram): Left-to-right flow showing system dependencies
  • DAG (Directed Acyclic Graph): Force-directed layout for complex dependency visualization

Core Components

The graphical system consists of several interconnected elements:

Node Representation

Components are visualized as nodes with distinct shapes, colors, and styles based on their type and properties. The visual encoding provides immediate insight into component roles and status.

Node Shapes - Detailed guide to component visual encoding

Color Schemes

Components can be colored by category, tags, availability metrics, or impact scores to highlight different aspects of your system.

Categories - Predefined category color schemes and customization

Tags - Tag-based coloring and combined category+tag presets

Edge Styles

Dependencies between components are shown as directed edges with different line styles and labels indicating the relationship type (do, and, or, n_of_k).

Key Features

Automatic Layout: Intelligent positioning algorithms optimize node placement for readability

Interactive Elements: Click components to highlight dependencies and view detailed information

Export Options: Generate SVG files for documentation, presentations, or external tools

Real-time Updates: Diagrams automatically refresh when model structure changes

Overlay Data: Display simulation results (availability, impact scores) directly on the graph

Configuration

Graph appearance is controlled through the graph_settings section of your model:

graph_settings:
  layout: fta                    # fta, rbd, or dag
  color_mode: type              # type (default), category, tag, category+tag, availability, impact_score
  show_edge_labels: true        # show dependency type labels
  show_node_labels:
    name: true                  # component names
    type: false                 # component types
    category: false             # categories
    # ... other label options
  category_colors:              # custom color overrides
    risk: "#ff6b6b"
    infra: "#4ecdc4"

Layout Types

FTA (Fault Tree Analysis)

  • Direction: Bottom-to-top (BT)
  • Best for: Understanding how component failures propagate to system failure
  • Edge style: Orthogonal (right angles)

RBD (Reliability Block Diagram)

  • Direction: Left-to-right (LR)
  • Best for: Following the flow of dependencies and success paths
  • Edge style: Orthogonal (right angles)

DAG (Directed Acyclic Graph)

  • Layout: Force-directed positioning
  • Best for: Complex models with many interconnections
  • Edge style: Curved polylines for better readability

Next Steps

Explore the detailed guides for each aspect of graphical representation:

  • Node Shapes - Component visual encoding and shape meanings
  • Categories - Category-based coloring and customization
  • Tags - Tag-based coloring and combination presets

Related topics: - Components - Defining the nodes that get visualized - Dependencies - Creating the edges between nodes - BN Results - Overlaying analysis results on graphs