Skip to content

XYChart axis config Schema ​

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/XYChartAxisConfig

此对象包含 XYChart 轴配置的配置

AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

XYChartAxisConfig Type ​

object (XYChart axis config)

XYChartAxisConfig Properties ​

PropertyTypeRequiredNullableDefined by
showLabelbooleanRequiredcannot be nullMermaid Config
labelFontSizenumberRequiredcannot be nullMermaid Config
labelPaddingnumberRequiredcannot be nullMermaid Config
showTitlebooleanRequiredcannot be nullMermaid Config
titleFontSizenumberRequiredcannot be nullMermaid Config
titlePaddingnumberRequiredcannot be nullMermaid Config
showTickbooleanRequiredcannot be nullMermaid Config
tickLengthnumberRequiredcannot be nullMermaid Config
tickWidthnumberRequiredcannot be nullMermaid Config
showAxisLinebooleanRequiredcannot be nullMermaid Config
axisLineWidthnumberRequiredcannot be nullMermaid Config
labelRotationnumberRequiredcannot be nullMermaid Config

showLabel ​

应显示轴标签(刻度文本)

showLabel

showLabel Type ​

boolean

showLabel Default Value ​

The default value is:

json
true

labelFontSize ​

轴标签的字体大小(刻度文本)

labelFontSize

labelFontSize Type ​

number

labelFontSize Constraints ​

minimum: the value of this number must greater than or equal to: 1

labelFontSize Default Value ​

The default value is:

json
14

labelPadding ​

轴标签(刻度文本)的顶部和底部空间

labelPadding

labelPadding Type ​

number

labelPadding Constraints ​

minimum: the value of this number must greater than or equal to: 0

labelPadding Default Value ​

The default value is:

json
5

showTitle ​

应显示轴标题

showTitle

showTitle Type ​

boolean

showTitle Default Value ​

The default value is:

json
true

titleFontSize ​

轴标题的字体大小

titleFontSize

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
16

titlePadding ​

轴标题的顶部和底部空间

titlePadding

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
5

showTick ​

应显示轴刻度线

showTick

showTick Type ​

boolean

showTick Default Value ​

The default value is:

json
true

tickLength ​

轴刻度线的长度

tickLength

tickLength Type ​

number

tickLength Constraints ​

minimum: the value of this number must greater than or equal to: 1

tickLength Default Value ​

The default value is:

json
5

tickWidth ​

轴刻度线的宽度

tickWidth

tickWidth Type ​

number

tickWidth Constraints ​

minimum: the value of this number must greater than or equal to: 1

tickWidth Default Value ​

The default value is:

json
2

showAxisLine ​

显示跨轴线

showAxisLine

showAxisLine Type ​

boolean

showAxisLine Default Value ​

The default value is:

json
true

axisLineWidth ​

轴线的宽度

axisLineWidth

axisLineWidth Type ​

number

axisLineWidth Constraints ​

minimum: the value of this number must greater than or equal to: 1

axisLineWidth Default Value ​

The default value is:

json
2

labelRotation ​

标签旋转角度

labelRotation

labelRotation Type ​

number

labelRotation Constraints ​

maximum: the value of this number must smaller than or equal to: 90

minimum: the value of this number must greater than or equal to: -90

labelRotation Default Value ​

The default value is:

json
0
Opens in mermaid.ai