> ## Documentation Index
> Fetch the complete documentation index at: https://omer-914cc1c6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mermaid

> 使用 Mermaid 渲染图表

[Mermaid](https://mermaid.js.org/) 让你用文本和代码创建流程图、时序图、甘特图等各类图表。

有关支持的图表类型和语法的完整列表，请参见 [Mermaid 文档](https://mermaid.js.org/intro/)。

```mermaid theme={null}
  flowchart LR
    subgraph subgraph1
        direction TB
        top1[top] --> bottom1[bottom]
    end
    subgraph subgraph2
        direction TB
        top2[top] --> bottom2[bottom]
    end
    %% ^ 这些子图完全相同，唯一区别在于指向它们的链接：

    %% 链接*到* subgraph1：subgraph1 的方向保持不变
    outside --> subgraph1
    %% 链接*在* subgraph2 *内部*：
    %% subgraph2 继承顶级图的方向 (LR)
    outside ---> top2
```

````mdx Mermaid flowchart example theme={null}
```mermaid
  flowchart LR
    subgraph subgraph1
        direction TB
        top1[顶部] --> bottom1[底部]
    end
    subgraph subgraph2
        direction TB
        top2[顶部] --> bottom2[底部]
    end
    %% ^ 这些子图是相同的，除了指向它们的链接：

    %% 链接*到* subgraph1：subgraph1 的方向得以保持
    outside --> subgraph1
    %% 链接*在* subgraph2 *内部*：
    %% subgraph2 继承顶级图的方向 (LR)
    outside ---> top2
```
````

<div id="syntax">
  ## 语法
</div>

要创建 Mermaid 图表，请将图表定义写入 Mermaid 代码块中。

````mdx theme={null}
```mermaid
// 在此处编写您的 mermaid 图表代码
```
````
