Basic example
Rendering requirements is straightforward:Syntax overview
There are three types of components to a requirement diagram: requirement, element, and relationship.Requirements
A requirement definition contains a requirement type, name, id, text, risk, and verification method:| Keyword | Options |
|---|---|
| Type | requirement, functionalRequirement, interfaceRequirement, performanceRequirement, physicalRequirement, designConstraint |
| Risk | Low, Medium, High |
| VerificationMethod | Analysis, Inspection, Test, Demonstration |
Elements
An element definition contains an element name, type, and document reference:Relationships
Relationships connect source and destination nodes:Markdown formatting
You can use markdown formatting in text fields by surrounding the text in quotes:Complete example
This example demonstrates all requirement types and relationship options:Direction
The diagram can be rendered in different directions: Valid directions: TB (top to bottom), BT (bottom to top), LR (left to right), RL (right to left)Styling
Direct styling
Direct styling
Use the
style keyword to apply CSS styles directly:Class definitions
Class definitions
Define reusable styles using
classDef and apply them with the class keyword or ::: syntax:A class named
default will be applied to all nodes. Specific styles should be defined afterwards to override the default styling.