Skip to content

Latest commit

 

History

History
136 lines (131 loc) · 7.29 KB

nodes-doc.md

File metadata and controls

136 lines (131 loc) · 7.29 KB

Array of nodes

Type: array

path: #nodeSchema

$id: nodeSchema

  • Items
  • Node

  • Type: object
  • path: #nodeSchema/items
  • Properties
    • height
      • The height of the node.
      • Type: number
      • path: #nodeSchema/items/properties/height
      • Default: 50
    • width
      • The width of the node.
      • Type: number
      • path: #nodeSchema/items/properties/width
      • Default: 50
    • fill
      • Color of the node.
      • Type: string
      • path: #nodeSchema/items/properties/fill
      • Default: "white"
    • fontsize
      • Size of the text inside the nodes.
      • Type: number
      • path: #nodeSchema/items/properties/fontsize
      • Default: 12
    • id
      • Used to refer to the node. Used by e.g. an edge to connect two nodes or used by children to specify its parent node.
      • Type: string
      • path: #nodeSchema/items/properties/id
    • image
      • The image inside a node. This image takes up the entire width and height of the node.
      • Type: string
      • path: #nodeSchema/items/properties/image
    • label
      • The text inside a node. If you want a newline in your text, you should manually put '\n' in your string. If the label does not fit the node in which it appears, fontsize will be made smaller so label fits its node (the minimum value to which fontsize will be reduced, is the defined fontsize divided by two).
      • Type: string
      • path: #nodeSchema/items/properties/label
    • parentNode
      • The parent of other nodes. If you want to add a node inside another node, you have to set parentNode in the child as the ID of the parent.
      • Type: string
      • path: #nodeSchema/items/properties/parentNode
    • preset
      • Refer to a preset defined in the config of the global defaults. If you haven't used a key in your config (but that key is used in your preset), the key from the preset is taken as a key in your individual config. You can refer to multiple presets: the first preset has priority on the second, the second on the third, ... In general, the priority of the keys is: local > first preset > second preset > ... > keys in global default.
      • Types: array, string
      • path: #nodeSchema/items/properties/preset
    • shape
      • The shape of the node.
      • Type: string
      • path: #nodeSchema/items/properties/shape
      • The value is restricted to the following:
        1. "icon"
        2. "8-star"
        3. "big-star"
        4. "circle"
        5. "cylinder"
        6. "diamond"
        7. "ellipse"
        8. "hexagon"
        9. "note"
        10. "rectangle"
        11. "square"
        12. "star"
        13. "triangle"
        14. "comunica"
        15. "rmlio"
        16. "solid"
        17. "Details"
      • Default: "square"
    • iconName
      • When 'shape' is set to 'icon', you can set 'iconName' to anything you find in react-icons. Since this is a third-party library, not all styling will work. Only fill, strokeWidth, width and height will have effect.
      • Type: string
      • path: #nodeSchema/items/properties/iconName
    • stroke
      • The color of the stroke of the node.
      • Type: string
      • path: #nodeSchema/items/properties/stroke
      • Default: "black"
    • strokeDasharray
      • The dash pattern of the node. See MDN Web Docs for more information. The default value solid will fall back to the CSS value 0, dashed to 6 4, dottedto1 3, variedto5 2 1 2and dashed-wide-gaps will fall back to4 8`.
      • Types: number, string
      • path: #nodeSchema/items/properties/strokeDasharray
      • Example values:
        1. "solid"
        2. "dashed"
        3. "dotted"
        4. "varied"
        5. "dashed-wide-gaps"
      • Default: "solid"
    • strokeWidth
      • The thickness of the stroke of the nodes.
      • Type: number
      • path: #nodeSchema/items/properties/strokeWidth
      • Default: 1
    • title
      • The title of a node. E.g. useful to name a parentNode. Notice that this is not the same as an ID. If you give a node a title, that title will show up not in the middle of the node, but at the top. If the title does not fit the node in which it appears, fontsize will be made smaller to fit the node (the minimum value to which fontsize will be reduced, is the defined fontsize divided by two).
      • Type: string
      • path: #nodeSchema/items/properties/title
    • topText
      • Set on top of the node.
      • Type: string
      • path: #nodeSchema/items/properties/topText
    • zIndex
      • Controls the stacking order of the nodes.
      • Type: number
      • path: #nodeSchema/items/properties/zIndex
      • Default: 0
    • hgroup
      • Align a group of nodes vertically.
      • Type: string
      • path: #nodeSchema/items/properties/hgroup
    • vgroup
      • Align a group of nodes horizontally.
      • Type: string
      • path: #nodeSchema/items/properties/vgroup
    • position
      • Position schema

      • Type: object
      • path: #positionSchema
      • $id: positionSchema
      • Properties
        • x
          • Type: number
          • path: #positionSchema/properties/x
        • y
          • Type: number
          • path: #positionSchema/properties/y

Generated with json-schema-md-doc