XYChart 配置模式
https://mermaid.npmjs.net.cn/schemas/config.schema.json#/$defs/XYChartConfig
此对象包含特定于 XYChart 的配置
抽象 | 可扩展 | 状态 | 可识别 | 自定义属性 | 附加属性 | 访问限制 | 定义于 |
---|---|---|---|---|---|---|---|
可以实例化 | 否 | 未知状态 | 否 | 禁止 | 允许 | 无 | config.schema.json* |
XYChartConfig 类型
object
(XYChart 配置)
all of
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
此对象包含 XYChart 轴配置
xAxis
必需
类型:
object
(XYChart 轴配置)不能为空
定义于: Mermaid 配置
xAxis 类型
object
(XYChart 轴配置)
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
此对象包含 XYChart 轴配置
yAxis
必需
类型:
object
(XYChart 轴配置)不能为空
定义于: Mermaid 配置
yAxis 类型
object
(XYChart 轴配置)
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