跳至內容

介面:MermaidConfig

mermaid.MermaidConfig

屬性

altFontFamily

選用 altFontFamily: string

定義於

packages/mermaid/src/config.type.ts:122


architecture

選用 architecture: ArchitectureDiagramConfig

定義於

packages/mermaid/src/config.type.ts:194


arrowMarkerAbsolute

選用 arrowMarkerAbsolute: boolean

控制 HTML 程式碼中的箭頭標記是否為絕對路徑或錨點。 如果您正在使用 base 標籤設定,這點很重要。

定義於

packages/mermaid/src/config.type.ts:141


block

選用 block: BlockDiagramConfig

定義於

packages/mermaid/src/config.type.ts:201


c4

選用 c4: C4DiagramConfig

定義於

packages/mermaid/src/config.type.ts:198


class

選用 class: ClassDiagramConfig

定義於

packages/mermaid/src/config.type.ts:187


darkMode

選用 darkMode: boolean

定義於

packages/mermaid/src/config.type.ts:113


deterministicIDSeed

選用 deterministicIDSeed: string

此選項是確定性 ID 的選用種子。 如果設定為 undefined 但 deterministicIds 為 true,則會使用簡單的數字迭代器。 您可以設定此屬性以將種子基於靜態字串。

定義於

packages/mermaid/src/config.type.ts:181


deterministicIds

選用 deterministicIds: boolean

此選項控制 SVG 中節點產生的 ID 是隨機產生,還是基於種子產生。 如果設定為 false,則 ID 會根據目前日期產生,因此不具確定性。 這是預設行為。

如果您的檔案被簽入原始碼控制系統(例如 git),並且除非內容變更否則不應變更,則此點很重要。

定義於

packages/mermaid/src/config.type.ts:174


dompurifyConfig

選用 dompurifyConfig: Config

定義於

packages/mermaid/src/config.type.ts:202


elk

選用 elk: Object

類型宣告

名稱類型描述
cycleBreakingStrategy?"GREEDY" | "DEPTH_FIRST" | "INTERACTIVE" | "MODEL_ORDER" | "GREEDY_MODEL_ORDER"此策略決定如何在圖表中找到迴圈,並決定需要調整哪些邊來打破迴圈。
mergeEdges?booleanElk 特定的選項,允許邊在方便的地方共用路徑。 這可以產生美觀的圖表,但也可能使圖表更難以閱讀。
nodePlacementStrategy?"SIMPLE" | "NETWORK_SIMPLEX" | "LINEAR_SEGMENTS" | "BRANDES_KOEPF"影響節點放置方式的 Elk 特定選項。

定義於

packages/mermaid/src/config.type.ts:91


er

選用 er: ErDiagramConfig

定義於

packages/mermaid/src/config.type.ts:189


flowchart

選用 flowchart: FlowchartDiagramConfig

定義於

packages/mermaid/src/config.type.ts:182


fontFamily

選用 fontFamily: string

指定在呈現的圖表中使用的字型。 可以是任何可能的 CSS font-family。 請參閱 https://developer.mozilla.org/en-US/docs/Web/CSS/font-family

定義於

packages/mermaid/src/config.type.ts:121


fontSize

選用 fontSize: number

定義於

packages/mermaid/src/config.type.ts:204


forceLegacyMathML

選用 forceLegacyMathML: boolean

此選項強制 Mermaid 依賴 KaTeX 自己的樣式表來呈現 MathML。 由於作業系統字型與瀏覽器的 MathML 實作之間存在差異,如果一致的呈現效果很重要,建議使用此選項。 如果設定為 true,則會忽略 legacyMathML。

定義於

packages/mermaid/src/config.type.ts:163


gantt

選用 gantt: GanttDiagramConfig

定義於

packages/mermaid/src/config.type.ts:184


gitGraph

選用 gitGraph: GitGraphDiagramConfig

定義於

packages/mermaid/src/config.type.ts:197


handDrawnSeed

選用 handDrawnSeed: number

定義使用手繪外觀時要使用的種子。 這對於自動化測試很重要,因為沒有種子的話,測試結果始終會發現差異。 預設值為 0,這會給出隨機種子。

定義於

packages/mermaid/src/config.type.ts:76


htmlLabels

選用 htmlLabels: boolean

定義於

packages/mermaid/src/config.type.ts:114


旅程圖 (journey)

Optional journey: JourneyDiagramConfig

定義於

packages/mermaid/src/config.type.ts:185


看板圖 (kanban)

Optional kanban: KanbanDiagramConfig

定義於

packages/mermaid/src/config.type.ts:196


版面配置 (layout)

Optional layout: string

定義用於渲染圖表的版面配置演算法。

定義於

packages/mermaid/src/config.type.ts:81


舊版MathML (legacyMathML)

Optional legacyMathML: boolean

此選項指定 Mermaid 是否可以預期依賴項包含適用於沒有自己 MathML 實作的瀏覽器的 KaTeX 樣式表。如果此選項被禁用且不支援 MathML,則數學方程式將被警告取代。如果啟用此選項且不支援 MathML,Mermaid 將會回退到 KaTeX 的舊版渲染。

定義於

packages/mermaid/src/config.type.ts:156


日誌等級 (logLevel)

Optional logLevel: 0 | 2 | 1 | "trace" | "debug" | "info" | "warn" | "error" | "fatal" | 3 | 4 | 5

此選項決定 mermaid 使用的日誌記錄量。

定義於

packages/mermaid/src/config.type.ts:127


外觀 (look)

Optional look: "classic" | "handDrawn"

定義用於圖表的主要外觀。

定義於

packages/mermaid/src/config.type.ts:71


markdown自動換行 (markdownAutoWrap)

Optional markdownAutoWrap: boolean

定義於

packages/mermaid/src/config.type.ts:205


最大邊數 (maxEdges)

Optional maxEdges: number

定義可在圖表中繪製的最大邊數。

定義於

packages/mermaid/src/config.type.ts:90


最大文字大小 (maxTextSize)

Optional maxTextSize: number

使用者文字圖表允許的最大大小

定義於

packages/mermaid/src/config.type.ts:85


心智圖 (mindmap)

Optional mindmap: MindmapDiagramConfig

定義於

packages/mermaid/src/config.type.ts:195


封包圖 (packet)

Optional packet: PacketDiagramConfig

定義於

packages/mermaid/src/config.type.ts:200


圓餅圖 (pie)

Optional pie: PieDiagramConfig

定義於

packages/mermaid/src/config.type.ts:190


象限圖 (quadrantChart)

Optional quadrantChart: QuadrantChartConfig

定義於

packages/mermaid/src/config.type.ts:191


需求圖 (requirement)

Optional requirement: RequirementDiagramConfig

定義於

packages/mermaid/src/config.type.ts:193


桑基圖 (sankey)

Optional sankey: SankeyDiagramConfig

定義於

packages/mermaid/src/config.type.ts:199


安全 (secure)

Optional secure: string[]

此選項控制哪些 currentConfig 鍵被視為安全,並且只能通過調用 mermaid.initialize 來更改。這可以防止惡意的圖表指令覆蓋站點的默認安全性。

定義於

packages/mermaid/src/config.type.ts:148


安全級別 (securityLevel)

Optional securityLevel: "strict" | "loose" | "antiscript" | "sandbox"

已解析圖表的信任級別

定義於

packages/mermaid/src/config.type.ts:131


時序圖 (sequence)

Optional sequence: SequenceDiagramConfig

定義於

packages/mermaid/src/config.type.ts:183


頁面加載時啟動 (startOnLoad)

Optional startOnLoad: boolean

指示 mermaid 是否在頁面加載時啟動

定義於

packages/mermaid/src/config.type.ts:135


狀態圖 (state)

Optional state: StateDiagramConfig

定義於

packages/mermaid/src/config.type.ts:188


抑制錯誤渲染 (suppressErrorRendering)

Optional suppressErrorRendering: boolean

抑制在 DOM 中插入「語法錯誤」圖表。當您想控制如何處理應用程式中的語法錯誤時,這很有用。

定義於

packages/mermaid/src/config.type.ts:211


主題 (theme)

Optional theme: "default" | "base" | "dark" | "forest" | "neutral" | "null"

主題,CSS 樣式表。您也可以使用 themeCSS 來覆蓋此值。

定義於

packages/mermaid/src/config.type.ts:64


主題CSS (themeCSS)

Optional themeCSS: string

定義於

packages/mermaid/src/config.type.ts:66


主題變數 (themeVariables)

Optional themeVariables: any

定義於

packages/mermaid/src/config.type.ts:65


時間軸圖 (timeline)

Optional timeline: TimelineDiagramConfig

定義於

packages/mermaid/src/config.type.ts:186


換行 (wrap)

Optional wrap: boolean

定義於

packages/mermaid/src/config.type.ts:203


XY圖表 (xyChart)

Optional xyChart: XYChartConfig

定義於

packages/mermaid/src/config.type.ts:192