Skip to content

Commit

Permalink
enable travis
Browse files Browse the repository at this point in the history
  • Loading branch information
tgdwyer committed Dec 8, 2015
1 parent f003733 commit 93fd690
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "0.10"
- "4.1"
before_script:
- "npm install -g grunt-cli"
20 changes: 10 additions & 10 deletions WebCola/examples/smallworldwithgroups.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
}

.link {
stroke: #999;
stroke-opacity: .8;
stroke: darkgray;
stroke-width: 0.7px;
stroke-opacity: .4;
}

.group {
stroke: #fff;
stroke: white;
stroke-width: 1.5px;
opacity: 0.2;
opacity: 0.4;
}

</style>
Expand All @@ -46,7 +47,7 @@ <h1>Simple Groups Example</h1>
.attr("width", width)
.attr("height", height);

d3.json("graphdata/miserables.json", function (error, graph) {
d3.json("graphdata/braingraph.json", function (error, graph) {
var groupMap = {};
graph.nodes.forEach(function (v, i) {
var g = v.group;
Expand All @@ -66,9 +67,9 @@ <h1>Simple Groups Example</h1>
.nodes(graph.nodes)
.links(graph.links)
.groups(groups)
.jaccardLinkLengths(40, 0.7)
.jaccardLinkLengths(60, 0.7)
.avoidOverlaps(true)
.start(20, 10, 10);
.start(80, 0, 80);

var group = svg.selectAll('.group')
.data(groups)
Expand All @@ -81,8 +82,7 @@ <h1>Simple Groups Example</h1>
var link = svg.selectAll(".link")
.data(graph.links)
.enter().append("line")
.attr("class", "link")
.style("stroke-width", function (d) { return Math.sqrt(d.value); });
.attr("class", "link");

var node = svg.selectAll(".node")
.data(graph.nodes)
Expand Down Expand Up @@ -122,7 +122,7 @@ <h1>Simple Groups Example</h1>
.groups(groups)
.jaccardLinkLengths(40, 0.7)
.avoidOverlaps(true)
.start(20, 0, 10);
.start(40, 0, 40);
</code></pre>
In the above, <code>groups</code> is an array where each group object contains a single property
<code>leaves</code> which is an array of indices to the <code>graph.nodes</code> array. We turn on <code>avoidOverlaps</code> to get cola to
Expand Down

0 comments on commit 93fd690

Please sign in to comment.