From fea3517180f7f0a575dc135d9fe1d77ec0c1946c Mon Sep 17 00:00:00 2001 From: Alex de Mulder Date: Thu, 30 Jan 2014 10:24:22 +0100 Subject: [PATCH] added code example for clustering --- docs/graph.html | 23 ++++++++++++++++++++++- examples/timeline/01_basic.html | 2 ++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/graph.html b/docs/graph.html index 1ce8d7f4..79e8b196 100644 --- a/docs/graph.html +++ b/docs/graph.html @@ -1142,6 +1142,27 @@ var nodes = [
 // These variables must be defined in an options object named clustering.
+// If a variable is not supplied, the default value is used.
+var options = {
+    clustering: {
+      enabled: false,
+      initialMaxNumberOfNodes: 100,
+      absoluteMaxNumberOfNodes:500,
+      reduceToMaxNumberOfNodes:300,
+      chainThreshold: 0.4,
+      clusterEdgeThreshold: 20,
+      sectorThreshold: 50,
+      screenSizeThreshold: 0.2,
+      fontSizeMultiplier:  4.0,
+      forceAmplification:  0.6,
+      distanceAmplification: 0.2,
+      edgeGrowth: 11,
+      clusterSizeWidthFactor:  10,
+      clusterSizeHeightFactor: 10,
+      clusterSizeRadiusFactor: 10,
+      activeAreaBoxSize: 100
+    }
+}
 
@@ -1279,7 +1300,7 @@ var options: { initiallyVisible: true, enableToggling: true, iconPath: this._getIconURL() // automatic loading of the default icons - }, + } } diff --git a/examples/timeline/01_basic.html b/examples/timeline/01_basic.html index 514eefd1..9efa0301 100644 --- a/examples/timeline/01_basic.html +++ b/examples/timeline/01_basic.html @@ -7,6 +7,8 @@ body, html { font-family: sans-serif; } + +