Skip to content

Gantt Diagram Config Schema

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

The object containing configurations specific for gantt diagrams

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

GanttDiagramConfig Type

object (Gantt Diagram Config)

all of

GanttDiagramConfig Properties

PropertyTypeRequiredNullableDefined by
titleTopMarginintegerRequiredcannot be nullMermaid Config
barHeightintegerRequiredcannot be nullMermaid Config
barGapintegerOptionalcannot be nullMermaid Config
topPaddingintegerRequiredcannot be nullMermaid Config
rightPaddingintegerRequiredcannot be nullMermaid Config
leftPaddingintegerRequiredcannot be nullMermaid Config
gridLineStartPaddingintegerRequiredcannot be nullMermaid Config
fontSizeintegerRequiredcannot be nullMermaid Config
sectionFontSizeintegerRequiredcannot be nullMermaid Config
numberSectionStylesintegerRequiredcannot be nullMermaid Config
axisFormatstringRequiredcannot be nullMermaid Config
tickIntervalstringOptionalcannot be nullMermaid Config
topAxisbooleanRequiredcannot be nullMermaid Config
displayModestringOptionalcannot be nullMermaid Config
weekdaystringRequiredcannot be nullMermaid Config

titleTopMargin

Margin top for the text over the diagram

titleTopMargin

titleTopMargin Type

integer

titleTopMargin Constraints

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

titleTopMargin Default Value

The default value is:

json
25

barHeight

The height of the bars in the graph

barHeight

barHeight Type

integer

barHeight Constraints

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

barHeight Default Value

The default value is:

json
20

barGap

The margin between the different activities in the gantt diagram

barGap

barGap Type

integer

barGap Constraints

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

barGap Default Value

The default value is:

json
4

topPadding

Margin between title and gantt diagram and between axis and gantt diagram.

topPadding

topPadding Type

integer

topPadding Constraints

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

topPadding Default Value

The default value is:

json
50

rightPadding

The space allocated for the section name to the right of the activities

rightPadding

rightPadding Type

integer

rightPadding Constraints

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

rightPadding Default Value

The default value is:

json
75

leftPadding

The space allocated for the section name to the left of the activities

leftPadding

leftPadding Type

integer

leftPadding Constraints

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

leftPadding Default Value

The default value is:

json
75

gridLineStartPadding

Vertical starting position of the grid lines

gridLineStartPadding

gridLineStartPadding Type

integer

gridLineStartPadding Constraints

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

gridLineStartPadding Default Value

The default value is:

json
35

fontSize

Font size

fontSize

fontSize Type

integer

fontSize Constraints

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

fontSize Default Value

The default value is:

json
11

sectionFontSize

Font size for sections

sectionFontSize

  • is required

  • Type: integer

  • cannot be null

  • defined in: Mermaid Config

  • tsType: string | number

sectionFontSize Type

integer

sectionFontSize Constraints

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

sectionFontSize Default Value

The default value is:

json
11

numberSectionStyles

The number of alternating section styles

numberSectionStyles

numberSectionStyles Type

integer

numberSectionStyles Constraints

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

numberSectionStyles Default Value

The default value is:

json
4

axisFormat

Date/time format of the axis

This might need adjustment to match your locale and preferences.

axisFormat

axisFormat Type

string

axisFormat Default Value

The default value is:

json
"%Y-%m-%d"

tickInterval

axis ticks

Pattern is:

javascript
/^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/;

tickInterval

tickInterval Type

string

tickInterval Constraints

pattern: the string must match the following regular expression:

javascript
/^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/

try pattern

topAxis

When this flag is set, date labels will be added to the top of the chart

topAxis

topAxis Type

boolean

displayMode

Controls the display mode.

displayMode

displayMode Type

string

displayMode Constraints

enum: the value of this property must be equal to one of the following values:

ValueExplanation
""
"compact"Enables displaying multiple tasks on the same row.

weekday

On which day a week-based interval should start

weekday

weekday Type

string

weekday Constraints

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"monday"
"tuesday"
"wednesday"
"thursday"
"friday"
"saturday"
"sunday"

weekday Default Value

The default value is:

json
"sunday"