Skip to content
Huston Hedinger edited this page Nov 27, 2013 · 2 revisions

style

style is an optional dictionary capable of storing all generalized data about the GraphJSON. All values passed to a graph visualization through the top level style parameters will be overwritten by the style parameter for each node or edge for individual objects in the GraphJSON. For instance, if style: {nodeStyle: {fill: "blue" is passed, the default color fill for all nodes in the graph will be "blue". Therefore, if an individual node defines nodeStyle: {fill: "red",...}, that specific node will display with a red fill.

As another example, if meta: {locked: "true"} all nodes will be stationary after the initial layout, however any nodes that explicitly pass {nodeMeta: {locked: "false"} as a parameter will remain draggable by the user and successive layout computations.

meta is a dictionary that is capable of holding the following optional top level keys:

  • nodeStyle
  • edgeStyle
  • locked
  • layout
  • graphStyle

Clone this wiki locally