Decorations

Four Nodes

Tasks

add four nodes add a text decoration saying "Four Nodes" at the top-center of the canvas lower the decoration's position by a small amount change the font size of the decoration to 30 change the font family of the decoration to "Arial" add a region decoration centered at the middle with height and width being half the canvas and color it red

JSON Representation

{
"directed": false,
"hasParents": false,
"nodes": {
  "A": {},
  "B": {},
  "C": {},
  "D": {}
},
"edges": {},
"constraints": [],
"decorations": {
  "decoration1": {
    "type": "text",
    "x": 0.5,
    "y": 0.95,
    "text": "Four Nodes",
    "fontSize": 30,
    "fontFamily": "Arial"
  },
  "decoration2": {
    "type": "region",
    "x": 0.5,
    "y": 0.5,
    "fillColor": "red",
    "region": {
      "width": 0.5,
      "height": 0.5
    }
  }
},
"_positions": {
  "A": [
    -2.3321460467132646,
    3.0928545444827935
  ],
  "B": [
    -3.091890800965637,
    -2.33139021399071
  ],
  "C": [
    2.33209023592692,
    -3.092879270898368
  ],
  "D": [
    3.0919466121314247,
    2.33141494558948
  ]
}
}