Skip to content

Commit

Permalink
added logic to generate the JSON for line graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
ebensing committed Jul 18, 2013
1 parent df3928e commit 8b5f3cd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ exports.buildGraphs = function (runs, job, repo_loc, callback) {
data.push(chartData);
break;
case "line":
var chartData = [];
var l = runs.length;
for (var x=0; x < l; x++) {
var run = runs[x];
var o = {};
o.x = run.lastCommit;
for (var w=0; w < chart.config.lines.length; w++) {
var line = chart.config.lines[w];
o[line.taskTitle + "-" + line.field] = run.output[line.taskTitle][line.field];
}
chartData.push(o);
}
data.push(chartData);
break;
}
}
Expand Down

0 comments on commit 8b5f3cd

Please sign in to comment.