Skip to content

Packet Diagram Config Schema ​

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

The object containing configurations specific for packet diagrams.

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

PacketDiagramConfig Type ​

object (Packet Diagram Config)

all of

PacketDiagramConfig Properties ​

PropertyTypeRequiredNullableDefined by
rowHeightnumberOptionalcannot be nullMermaid Config
bitWidthnumberOptionalcannot be nullMermaid Config
bitsPerRownumberOptionalcannot be nullMermaid Config
showBitsbooleanOptionalcannot be nullMermaid Config
bitOrderstringOptionalcannot be nullMermaid Config
paddingXnumberOptionalcannot be nullMermaid Config
paddingYnumberOptionalcannot be nullMermaid Config

rowHeight ​

The height of each row in the packet diagram.

rowHeight

rowHeight Type ​

number

rowHeight Constraints ​

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

rowHeight Default Value ​

The default value is:

json
32

bitWidth ​

The width of each bit in the packet diagram.

bitWidth

bitWidth Type ​

number

bitWidth Constraints ​

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

bitWidth Default Value ​

The default value is:

json
32

bitsPerRow ​

The number of bits to display per row.

bitsPerRow

bitsPerRow Type ​

number

bitsPerRow Constraints ​

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

bitsPerRow Default Value ​

The default value is:

json
32

showBits ​

Toggle to display or hide bit numbers.

showBits

showBits Type ​

boolean

showBits Default Value ​

The default value is:

json
true

bitOrder ​

The direction each row is numbered in. descending mirrors every row so it reads from that row's highest bit on the left down to its lowest bit on the right, the convention used for hardware registers. Fields are still declared lowest bit first, and keep their width.

bitOrder

bitOrder Type ​

string

bitOrder Constraints ​

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

ValueExplanation
"ascending"Number each row from its lowest bit on the left up to its highest bit on the right.
"descending"Number each row from its highest bit on the left down to its lowest bit on the right.

bitOrder Default Value ​

The default value is:

json
"ascending"

paddingX ​

The horizontal padding between the blocks in a row.

paddingX

paddingX Type ​

number

paddingX Constraints ​

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

paddingX Default Value ​

The default value is:

json
5

paddingY ​

The vertical padding between the rows.

paddingY

paddingY Type ​

number

paddingY Constraints ​

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

paddingY Default Value ​

The default value is:

json
5
Opens in mermaid.ai