-
Book Overview & Buying
-
Table Of Contents
The Official Guide to Mermaid.js
By :
In this section, we will learn how to create edges between nodes. We have already seen some examples of this, but now, it is time to go deeper and look at alternate ways of creating edges between nodes. You will learn about different types of edges and the symbols that can be set at the beginning and the end of an edge. We will also look at different ways to add labels to an edge.
There is a lot to learn about edges. Let's start by looking at how to chain edges. This is a compact syntax that lets you define many links of a node in the same statement, as well as a chain of edges between nodes in one row.
The easiest way to connect two nodes is to add an edge between two node IDs by using ID EDGE ID. One example of an EDGE we have seen so far is an arrowhead, which has --> as a symbol and ID as a string. This allows most, but not all, text. A simple example of an ID EDGE ID statement is Id1 --> Id2. This is intuitive and readable...