Skip to content

Commit

Permalink
[work in progress] Working on splitting user names and linking them
Browse files Browse the repository at this point in the history
  • Loading branch information
pluehne committed Nov 15, 2017
1 parent 7e9ce8d commit be7a159
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions docs/assets/js/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,20 +362,28 @@ function createTable(table)
.enter()
.append("td")
.each(function(d, i) {
var cell = d3.select(this);
const cell = d3.select(this);
switch (data.columns[i].toLowerCase()) {
case "user":
case "organization":
case "repository":
case "resource":
case "fork":
cell = cell
.append("a")
.attr("target", "_blank")
.attr("href", gheUrl() + "/" + d);
break;
case "owners": {
const entries = d.split(",");
console.log(entries);
for (let i = 0; i < entries.length; i++) {
if (i > 0)
cell.innerHTML += ", ";
cell = cell
.append("a")
.attr("target", "_blank")
.attr("href", gheUrl() + "/" + entries[i]);
break;
}
}
}
cell.text(function(d) { return d; })
cell.text(function(d) { return d; });
});
});
}
Expand Down

0 comments on commit be7a159

Please sign in to comment.