Skip to main content

Diagrams

Diagram specific attributes

DisplaySchema

Control on how shape to be displayed. See example.

ENUM VALUES

  • invisible The shape itself is invisible but it's children are rendered as normal
  • none The shape and it's children are not displayed
  • inactive Border or edge is rendered as dashed lines
  • entity Force the shape to be treated as an entity, all children will be hidden

ArrowSchema

Dependency arrow styles. See example.

ENUM VALUES

  • end
  • start
  • both
  • none

AlignSchema

Horizontal alignment control. See example.

ENUM VALUES

  • left
  • center
  • right

VerticalAlignSchema

Vertical alignment control. See example.

ENUM VALUES

  • top
  • middle
  • bottom

DirectionSchema

Direction of children layout. Default is horizontal for container shapes. See example.

ENUM VALUES

  • vertical
  • horizontal

SpaceSchema

Margin/padding for the shape.

NameTypeDescriptionDefault
top

number

Top space in pixels

15

bottom

number

Bottom space in pixels

15

left

number

Left space in pixels

15

right

number

Right space in pixels

15

DiagramNodeSchema

Diagram attributes to control the visual.

NameTypeDescription
_color

string

Set shape strokeColor and fontColor all together. See example

_background

string

Background fillColor for the shape. See example

_width

number

Width of the shape. See example

_height

number

Height of the shape. See example

_x

number

X position of the shape for absolute layout. See example

_y

number

Y position of the shape for absolute layout. See example

_margin

SpaceSchema

Margin/padding for the shape

_padding

SpaceSchema

Margin/padding for the shape

_display

DisplaySchema

Control on how shape to be displayed. See example

_distributed

boolean

Children are distributed evenly within a container when there is extra space by default. However dependency layout algorithms may change this behavior. This attribute will prevent shape to be moved by dependency layout algorithms.

_direction

DirectionSchema

Direction of children layout. Default is horizontal for container shapes. See example

_align

AlignSchema

Horizontal alignment control. See example

_verticalAlign

VerticalAlignSchema

Vertical alignment control. See example

_arrow

ArrowSchema

Dependency arrow styles. See example

_image

string

Image URL or base64 encoded string for the entitiy. See example

_mxGraphModel

string

To extract the style from mxGraphModel XML string which you can copy from drawio diagram for easy customization. See example

_view

string

Nodes visibility will be decided by the activated view(s). Parent value are passed down to children automatically. See example

_style

Flexible style attribute to customize the shape as drawio mxCell style attriburte. See example