Repository navigation
Layout
#####alpha:
[float] .5
Is a part of the d3 force layout, alpha sets the cooling parameter for the force layout. You can read more about how changing the default value for alpha can change the layout here.
#####cluster:
[false| 'string'] false
Currently implemented as bool
Clustering nodes will have an effect on layout and color. If you wish to cluster nodes, simply define the key that will identify a nodes cluster within each node object in your GraphJSON data object. E.g. if you have identified node communities by assigning them communities as ingtegers under the "community" key in your GraphJSON, that is the key that you would pass to cluster. Alchemy.js will except any values under the cluster key in the GraphJSON (string, integer, float) as long as precisely the same value is used for all nodes in a cluster.
#####clusterColours:
[array of strings]
["#DD79FF", "#FFFC00","#00FF30", "#5168FF","#00C0FF", "#FF004B", "#00CDCD", "#f83f00", "#f800df", "#ff8d8f","#ffcd00", "#184fff","#ff7e00"])
curently implemented as colours
Provides a list of colors that can be assigned to different clusters. Elements are strings of hex or rgb values. The above colors are the defaults that are randomly assigned to the clusters using the fisherYates algorithm.
#####fixNodes:
[bool] false
not currently implemented
all nodes are draggable by default
#####fixRootNodes:
[bool] false
not currently implemented
root nodes are draggable by default
#####forceLocked:
[bool] true
not currently implemented
force layout does not continue after initial node layout
#####linkDistance:
[integer|function] 2000
Alchemy.js provides the ability for a user defined custom link distance function in the force layout. If you wish to override the default value with a function or provide another static value, simply pass it as the value for linkDistance. Read more about how linkDistance is used in d3's force layout here
#####nodePositions:
[bool|string] false
not currently implemented
pre-calculated layout positions for nodes