Custom Styles

Tasks

add three nodes A-C add associated data to node A: color with value blue add associated color data to nodes B and C: make them green and blue, respectively define a style foo that specifies a node shape of rectangle apply the style foo to exactly those nodes that have color data equal to blue add associated count data of 3 for node A and 2 for node B set the node size for all nodes to be the count data or 1 if it has no count data set each node's line color to its color data

JSON Representation

{
"directed": false,
"hasParents": false,
"nodes": {
  "A": {
    "data": {
      "color": "blue",
      "count": "3"
    },
    "style": "foo",
    "nodeSize": 3,
    "lineColor": "blue"
  },
  "B": {
    "data": {
      "color": "green",
      "count": "2"
    },
    "nodeSize": 2,
    "lineColor": "green"
  },
  "C": {
    "data": {
      "color": "blue"
    },
    "style": "foo",
    "nodeSize": 1,
    "lineColor": "blue"
  }
},
"edges": {},
"constraints": [],
"styles": {
  "foo": {
    "nodeShape": "rectangle"
  }
},
"_positions": {
  "A": [
    -2.6719888275495407,
    -1.6912937860324766
  ],
  "B": [
    -0.12869532749058035,
    3.159655267501933
  ],
  "C": [
    2.80069491114402,
    -1.4683750039798307
  ]
}
}