Skip to content

XYChart Config Schema

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

This object contains configuration specific to XYCharts

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

XYChartConfig Type

object (XYChart Config)

all of

XYChartConfig Properties

PropertyTypeRequiredNullableDefined by
widthnumberRequiredcannot be nullMermaid Config
heightnumberRequiredcannot be nullMermaid Config
titleFontSizenumberRequiredcannot be nullMermaid Config
titlePaddingnumberRequiredcannot be nullMermaid Config
showTitlebooleanRequiredcannot be nullMermaid Config
xAxisobjectRequiredcannot be nullMermaid Config
yAxisobjectRequiredcannot be nullMermaid Config
chartOrientationNot specifiedRequiredcannot be nullMermaid Config
plotReservedSpacePercentnumberRequiredcannot be nullMermaid Config

width

width of the chart

width

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 of the chart

height

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

Font size of the chart title

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
20

titlePadding

Top and bottom space from the chart title

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
10

showTitle

Should show the chart title

showTitle

showTitle Type

boolean

showTitle Default Value

The default value is:

json
true

xAxis

This object contains configuration for XYChart axis config

xAxis

xAxis Type

object (XYChart axis config)

xAxis Default Value

The default value is:

json
{
  "$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

This object contains configuration for XYChart axis config

yAxis

yAxis Type

object (XYChart axis config)

yAxis Default Value

The default value is:

json
{
  "$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

How to plot will be drawn horizontal or vertical

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

Minimum percent of space plots of the chart will take

plotReservedSpacePercent

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