主题
XYChart Config Schema
txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/XYChartConfig
此对象包含特定于 XYCharts 的配置
Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
---|---|---|---|---|---|---|---|
Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | config.schema.json* |
XYChartConfig Type
object
(XYChart Config)
all of
XYChartConfig Properties
Property | Type | Required | Nullable | Defined by |
---|---|---|---|---|
width | number | Required | cannot be null | Mermaid Config |
height | number | Required | cannot be null | Mermaid Config |
titleFontSize | number | Required | cannot be null | Mermaid Config |
titlePadding | number | Required | cannot be null | Mermaid Config |
showTitle | boolean | Required | cannot be null | Mermaid Config |
xAxis | object | Required | cannot be null | Mermaid Config |
yAxis | object | Required | cannot be null | Mermaid Config |
chartOrientation | Not specified | Required | cannot be null | Mermaid Config |
plotReservedSpacePercent | number | Required | cannot be null | Mermaid Config |
width
图表的宽度
width
is required
Type:
number
cannot be null
defined in: Mermaid Config
width Type
number
width Constraints
minimum: the value of this number must greater than or equal to: 1
width Default Value
The default value is:
json
700
height
图表的高度
height
is required
Type:
number
cannot be null
defined in: Mermaid Config
height Type
number
height Constraints
minimum: the value of this number must greater than or equal to: 1
height Default Value
The default value is:
json
500
titleFontSize
图表标题的字体大小
titleFontSize
is required
Type:
number
cannot be null
defined in: Mermaid Config
titleFontSize Type
number
titleFontSize Constraints
minimum: the value of this number must greater than or equal to: 1
titleFontSize Default Value
The default value is:
json
20
titlePadding
图表标题的顶部和底部空间
titlePadding
is required
Type:
number
cannot be null
defined in: Mermaid Config
titlePadding Type
number
titlePadding Constraints
minimum: the value of this number must greater than or equal to: 0
titlePadding Default Value
The default value is:
json
10
showTitle
应显示图表标题
showTitle
is required
Type:
boolean
cannot be null
defined in: Mermaid Config
showTitle Type
boolean
showTitle Default Value
The default value is:
json
true
xAxis
此对象包含 XYChart 轴配置的配置
xAxis
is required
Type:
object
(XYChart axis config)cannot be null
defined in: Mermaid Config
xAxis Type
object
(XYChart axis config)
xAxis Default Value
The default value is:
json
{
"$ref": "#/$defs/XYChartAxisConfig",
"title": "XYChart axis config",
"description": "此对象包含 XYChart 轴配置的配置",
"type": "object",
"unevaluatedProperties": true,
"required": [
"showLabel",
"labelFontSize",
"labelPadding",
"showTitle",
"titleFontSize",
"titlePadding",
"showTick",
"tickLength",
"tickWidth",
"showAxisLine",
"axisLineWidth"
],
"properties": {
"showLabel": {
"description": "应显示轴标签(刻度文本)",
"type": "boolean",
"default": true
},
"labelFontSize": {
"description": "轴标签的字体大小(刻度文本)",
"type": "number",
"default": 14,
"minimum": 1
},
"labelPadding": {
"description": "轴标签(刻度文本)的顶部和底部空间",
"type": "number",
"default": 5,
"minimum": 0
},
"showTitle": {
"description": "应显示轴标题",
"type": "boolean",
"default": true
},
"titleFontSize": {
"description": "轴标题的字体大小",
"type": "number",
"default": 16,
"minimum": 1
},
"titlePadding": {
"description": "轴标题的顶部和底部空间",
"type": "number",
"default": 5,
"minimum": 0
},
"showTick": {
"description": "应显示轴刻度线",
"type": "boolean",
"default": true
},
"tickLength": {
"description": "轴刻度线的长度",
"type": "number",
"default": 5,
"minimum": 1
},
"tickWidth": {
"description": "轴刻度线的宽度",
"type": "number",
"default": 2,
"minimum": 1
},
"showAxisLine": {
"description": "显示跨轴线",
"type": "boolean",
"default": true
},
"axisLineWidth": {
"description": "轴线的宽度",
"type": "number",
"default": 2,
"minimum": 1
}
}
}
yAxis
此对象包含 XYChart 轴配置的配置
yAxis
is required
Type:
object
(XYChart axis config)cannot be null
defined in: Mermaid Config
yAxis Type
object
(XYChart axis config)
yAxis Default Value
The default value is:
json
{
"$ref": "#/$defs/XYChartAxisConfig",
"title": "XYChart axis config",
"description": "此对象包含 XYChart 轴配置的配置",
"type": "object",
"unevaluatedProperties": true,
"required": [
"showLabel",
"labelFontSize",
"labelPadding",
"showTitle",
"titleFontSize",
"titlePadding",
"showTick",
"tickLength",
"tickWidth",
"showAxisLine",
"axisLineWidth"
],
"properties": {
"showLabel": {
"description": "应显示轴标签(刻度文本)",
"type": "boolean",
"default": true
},
"labelFontSize": {
"description": "轴标签的字体大小(刻度文本)",
"type": "number",
"default": 14,
"minimum": 1
},
"labelPadding": {
"description": "轴标签(刻度文本)的顶部和底部空间",
"type": "number",
"default": 5,
"minimum": 0
},
"showTitle": {
"description": "应显示轴标题",
"type": "boolean",
"default": true
},
"titleFontSize": {
"description": "轴标题的字体大小",
"type": "number",
"default": 16,
"minimum": 1
},
"titlePadding": {
"description": "轴标题的顶部和底部空间",
"type": "number",
"default": 5,
"minimum": 0
},
"showTick": {
"description": "应显示轴刻度线",
"type": "boolean",
"default": true
},
"tickLength": {
"description": "轴刻度线的长度",
"type": "number",
"default": 5,
"minimum": 1
},
"tickWidth": {
"description": "轴刻度线的宽度",
"type": "number",
"default": 2,
"minimum": 1
},
"showAxisLine": {
"description": "显示跨轴线",
"type": "boolean",
"default": true
},
"axisLineWidth": {
"description": "轴线的宽度",
"type": "number",
"default": 2,
"minimum": 1
}
}
}
chartOrientation
如何绘制水平或垂直图形
chartOrientation
is required
Type: unknown
cannot be null
defined in: Mermaid Config
tsType:
"vertical" | "horizontal"
chartOrientation Type
unknown
chartOrientation Default Value
The default value is:
json
"vertical"
plotReservedSpacePercent
图表占用的空间图的最小百分比
plotReservedSpacePercent
is required
Type:
number
cannot be null
defined in: Mermaid Config
plotReservedSpacePercent Type
number
plotReservedSpacePercent Constraints
minimum: the value of this number must greater than or equal to: 30
plotReservedSpacePercent Default Value
The default value is:
json
50