XY圖表配置綱要
https://mermaid.dev.org.tw/schemas/config.schema.json#/$defs/XYChartConfig
此物件包含 XY 圖表特定的設定
抽象 | 可擴展 | 狀態 | 可識別 | 自訂屬性 | 額外屬性 | 存取限制 | 定義於 |
---|---|---|---|---|---|---|---|
可以實例化 | 否 | 未知狀態 | 否 | 禁止 | 允許 | 無 | config.schema.json* |
XYChartConfig 類型
object
(XY圖表配置)
全部
XYChartConfig 屬性
屬性 | 類型 | 必填 | 可為空 | 定義者 |
---|---|---|---|---|
width | number | 必填 | 不可為空 | Mermaid 配置 |
height | number | 必填 | 不可為空 | Mermaid 配置 |
titleFontSize | number | 必填 | 不可為空 | Mermaid 配置 |
titlePadding | number | 必填 | 不可為空 | Mermaid 配置 |
showTitle | boolean | 必填 | 不可為空 | Mermaid 配置 |
xAxis | object | 必填 | 不可為空 | Mermaid 配置 |
yAxis | object | 必填 | 不可為空 | Mermaid 配置 |
chartOrientation | 未指定 | 必填 | 不可為空 | Mermaid 配置 |
plotReservedSpacePercent | number | 必填 | 不可為空 | Mermaid 配置 |
width
圖表的寬度
width
為必填
類型:
number
不可為空
定義於: Mermaid 配置
width 類型
number
width 約束
最小值: 此數字的值必須大於或等於: 1
width 預設值
預設值為
700
height
圖表的高度
height
為必填
類型:
number
不可為空
定義於: Mermaid 配置
height 類型
number
height 約束
最小值: 此數字的值必須大於或等於: 1
height 預設值
預設值為
500
titleFontSize
圖表標題的字體大小
titleFontSize
為必填
類型:
number
不可為空
定義於: Mermaid 配置
titleFontSize 類型
number
titleFontSize 約束
最小值: 此數字的值必須大於或等於: 1
titleFontSize 預設值
預設值為
20
titlePadding
圖表標題的頂部和底部空間
titlePadding
為必填
類型:
number
不可為空
定義於: Mermaid 配置
titlePadding 類型
number
titlePadding 約束
最小值: 此數字的值必須大於或等於: 0
titlePadding 預設值
預設值為
10
showTitle
是否顯示圖表標題
showTitle
為必填
類型:
boolean
不可為空
定義於: Mermaid 配置
showTitle 類型
boolean
showTitle 預設值
預設值為
true
xAxis
此物件包含 XY 圖表軸配置的設定
xAxis
為必填
類型:
object
(XY圖表軸配置)不可為空
定義於: Mermaid 配置
xAxis 類型
object
(XY圖表軸配置)
xAxis 預設值
預設值為
{
"$ref": "#/$defs/XYChartAxisConfig",
"title": "XYChart axis config",
"description": "This object contains configuration for XYChart axis config",
"type": "object",
"unevaluatedProperties": true,
"required": [
"showLabel",
"labelFontSize",
"labelPadding",
"showTitle",
"titleFontSize",
"titlePadding",
"showTick",
"tickLength",
"tickWidth",
"showAxisLine",
"axisLineWidth"
],
"properties": {
"showLabel": {
"description": "Should show the axis labels (tick text)",
"type": "boolean",
"default": true
},
"labelFontSize": {
"description": "font size of the axis labels (tick text)",
"type": "number",
"default": 14,
"minimum": 1
},
"labelPadding": {
"description": "top and bottom space from axis label (tick text)",
"type": "number",
"default": 5,
"minimum": 0
},
"showTitle": {
"description": "Should show the axis title",
"type": "boolean",
"default": true
},
"titleFontSize": {
"description": "font size of the axis title",
"type": "number",
"default": 16,
"minimum": 1
},
"titlePadding": {
"description": "top and bottom space from axis title",
"type": "number",
"default": 5,
"minimum": 0
},
"showTick": {
"description": "Should show the axis tick lines",
"type": "boolean",
"default": true
},
"tickLength": {
"description": "length of the axis tick lines",
"type": "number",
"default": 5,
"minimum": 1
},
"tickWidth": {
"description": "width of the axis tick lines",
"type": "number",
"default": 2,
"minimum": 1
},
"showAxisLine": {
"description": "Show line across the axis",
"type": "boolean",
"default": true
},
"axisLineWidth": {
"description": "Width of the axis line",
"type": "number",
"default": 2,
"minimum": 1
}
}
}
yAxis
此物件包含 XY 圖表軸配置的設定
yAxis
為必填
類型:
object
(XY圖表軸配置)不可為空
定義於: Mermaid 配置
yAxis 類型
object
(XY圖表軸配置)
yAxis 預設值
預設值為
{
"$ref": "#/$defs/XYChartAxisConfig",
"title": "XYChart axis config",
"description": "This object contains configuration for XYChart axis config",
"type": "object",
"unevaluatedProperties": true,
"required": [
"showLabel",
"labelFontSize",
"labelPadding",
"showTitle",
"titleFontSize",
"titlePadding",
"showTick",
"tickLength",
"tickWidth",
"showAxisLine",
"axisLineWidth"
],
"properties": {
"showLabel": {
"description": "Should show the axis labels (tick text)",
"type": "boolean",
"default": true
},
"labelFontSize": {
"description": "font size of the axis labels (tick text)",
"type": "number",
"default": 14,
"minimum": 1
},
"labelPadding": {
"description": "top and bottom space from axis label (tick text)",
"type": "number",
"default": 5,
"minimum": 0
},
"showTitle": {
"description": "Should show the axis title",
"type": "boolean",
"default": true
},
"titleFontSize": {
"description": "font size of the axis title",
"type": "number",
"default": 16,
"minimum": 1
},
"titlePadding": {
"description": "top and bottom space from axis title",
"type": "number",
"default": 5,
"minimum": 0
},
"showTick": {
"description": "Should show the axis tick lines",
"type": "boolean",
"default": true
},
"tickLength": {
"description": "length of the axis tick lines",
"type": "number",
"default": 5,
"minimum": 1
},
"tickWidth": {
"description": "width of the axis tick lines",
"type": "number",
"default": 2,
"minimum": 1
},
"showAxisLine": {
"description": "Show line across the axis",
"type": "boolean",
"default": true
},
"axisLineWidth": {
"description": "Width of the axis line",
"type": "number",
"default": 2,
"minimum": 1
}
}
}
chartOrientation
繪製圖表的方式,水平或垂直
chartOrientation
為必填
類型: 未知
不可為空
定義於: Mermaid 配置
tsType:
"vertical" | "horizontal"
chartOrientation 類型
未知
chartOrientation 預設值
預設值為
"vertical"
plotReservedSpacePercent
圖表繪圖所佔空間的最小百分比
plotReservedSpacePercent
為必填
類型:
number
不可為空
定義於: Mermaid 配置
plotReservedSpacePercent 類型
number
plotReservedSpacePercent 約束
最小值: 此數字的值必須大於或等於: 30
plotReservedSpacePercent 預設值
預設值為
50