Diagram Options

BlockDiag

Applies to blockdiag, seqdiag, actdiag, nwdiag, packetdiag and rackdiag:

Name Allowable Values Description

antialias

flag
empty string ("")

Apply anti-alias filter to diagram image
With flag set, option takes effect.

no-transparency

flag
empty string ("")

Disable transparent background of diagram (PNG only)
With flag set, option takes effect.

size

dimension format {width}x{height}
ex. 320x240

Size of diagram

no-doctype

flag
empty string ("")

Omit doctype definition tag (SVG only)
With flag set, option takes effect.

D2

Name Allowable Values Description

theme

  • default (0)

  • neutral-gray (1)

  • flagship-terrastruct (3)

  • cool-classics (4)

  • mixed-berry-blue (5)

  • grape-soda (6)

  • aubergine (7)

  • colorblind-clear (8)

  • vanilla-nitro-cola (100)

  • orange-creamsicle (101)

  • shirley-temple (102)

  • earth-tones (103)

  • everglade-green (104)

  • buttered-toast (105)

  • dark-mauve (200)

  • terminal (300)

  • terminal-grayscale (301)

layout

  • dagre (default)

  • elk

Use an alternate layout engine: d2lang.com/tour/layouts/

sketch

flag
empty string ("")

Render diagram with a hand-drawn aesthetic: d2lang.com/tour/sketch/

Ditaa

Name Allowable Values Description

no-antialias

any

Turns anti-aliasing off

no-separation

any

Prevents the separation of common edges of shapes

round-corners

any

Causes all corners to be rendered as round corners

scale

double
1.0

A natural number that determines the size of the rendered image. The units are fractions of the default size (2.5 renders 1.5 times biggerthan the default)

no-shadows

any

Turns off the drop-shadow effect

tabs

any

Tabs are normally interpreted as 8 spaces but it is possible to change that using this option

GraphViz

Name Allowable Values Description

graph-attribute-{name}

any
true

Set a graph attribute: graphviz.org/doc/info/command.html#-G

node-attribute-{name}

any
true

Set a default node attribute: graphviz.org/doc/info/command.html#-N

edge-attribute-{name}

any
true

Set a default edge attribute: graphviz.org/doc/info/command.html#-E

layout

string
dot
neato
fdp
sfdp
twopi
circo

Specifies which default layout algorithm to use, overriding the default from the command name: graphviz.org/doc/info/command.html#-K

scale

double
72.0

Set input scale to scale. If this value is omitted, 72.0 is used. This number is used to convert the point coordinate units used in the pos attribute into inches, which is what is expected by neato and fdp: graphviz.org/doc/info/command.html#-s

Mermaid

Mermaid naming convention for configuration is camelCase, for instance: htmlLabels. In addition, Mermaid allows to configure each diagram type using a prefix separated by a dot (.). For instance, if you want to configure the title top margin in an Entity Relation diagram, the option name is: er.titleTopMargin.

Since Kroki must be agnostic (and use consistent naming), you should use kebab-case instead of camelCase and replace . by _ (i.e., snake_case).

If we apply these rules to er.titleTopMargin it becomes er_title-top-margin. Please note that diagram options in Kroki are case-insensitive, so the following is also valid: ER_TITLE-TOP-MARGIN or ER_Title-Top-Margin.

For security reasons, the following options are not available:

  • maxTextSize

  • securityLevel

  • secure

  • startOnLoad

The complete list of options is available in Mermaid source code at: github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts

PlantUML

Name Allowable Values Description

theme

string

  • amiga

  • black-knight

  • bluegray

  • blueprint

  • cerulean-outline

  • cerulean

  • crt-amber

  • crt-green

  • cyborg-outline

  • cyborg

  • hacker

  • hacker-hold

  • lightgray

  • materia-outline

  • materia

  • metal

  • mimeograph

  • minty

  • plain

  • resume-light

  • sandstone

  • silver

  • sketchy-outline

  • sketchy

  • spacelab

  • superhero-outline

  • superhero

  • united

Use a specific theme (it will prepend the !theme directive in your diagram)

no-metadata

flag
empty string ("")

Do not save the diagram’s source code in the generated SVG/PNG metadata

Structurizr

Name Allowable Values Description

view-key

string

Key of the view (if the workspace contains more than one view)

output

string

  • diagram

  • legend

Select the output for the specified view.

Svgbob

Name Allowable Values Description

background

any
white

Backdrop background will be filled with this color

font-family

any
arial

Text will be rendered with this font

font-size

integer
14

Text will be rendered with this font size

fill-color

any
black

Solid shapes will be filled with this color

scale

any
1

Scale the entire svg (dimensions, font size, stroke width) by this factor

stroke-width

any
2

Stroke width for all lines

Symbolator

Name Allowable Values Description

component

string
empty string ("")

Select the component that will be rendered
If not set, the last component will be rendered

transparent

flag
empty string ("")

Background will be transparent instead of white
With flag set, option takes effect.

title

string
empty string ("")

This title will be inserted into the diagram

scale

number
1.0

Diagram will be scaled by this factor

no-type

flag
empty string ("")

Omit type information for the ports

library-name

string
empty string ("")

Add name of a library to the diagram.
Only works if title is also set