|
a/bitergiametrics/nf/metrics/swscopio.js |
|
b/bitergiametrics/nf/metrics/swscopio.js |
|
... |
|
... |
61 |
var
|
61 |
var
|
62 |
// index = o.index,
|
62 |
// index = o.index,
|
63 |
data = o.series.data, index = data[o.index][0]
|
63 |
data = o.series.data, index = data[o.index][0]
|
64 |
- firstMonth, value;
|
64 |
- firstMonth, value;
|
65 |
|
65 |
|
66 |
value = dates[index] + " (";
|
66 |
/* value = dates[index] + " (";
|
67 |
value += live[1][index] + " live, ";
|
67 |
value += live[1][index] + " live, ";
|
68 |
value += people[1][index] + " people, ";
|
68 |
value += people[1][index] + " people, ";
|
69 |
value += open[1][index] + " open, ";
|
69 |
value += open[1][index] + " open, ";
|
70 |
value += close[1][index] + " close ";
|
70 |
value += close[1][index] + " close ";
|
71 |
value += ")";
|
71 |
value += ")"; */
|
|
|
72 |
value ="Test";
|
72 |
|
73 |
|
73 |
return value;
|
74 |
return value;
|
74 |
},
|
75 |
},
|
75 |
xTickFormatter : function(index) {
|
76 |
xTickFormatter : function(index) {
|
76 |
return Math.floor(index / 12) + '';
|
77 |
return Math.floor(index / 12) + '';
|
|
... |
|
... |
215 |
|
216 |
|
216 |
// Create the TimeSeries
|
217 |
// Create the TimeSeries
|
217 |
vis = new envision.templates.Finance(options);
|
218 |
vis = new envision.templates.Finance(options);
|
218 |
});
|
219 |
});
|
219 |
}
|
220 |
}
|
|
|
221 |
|
|
|
222 |
// Display timeseries for commits and committers using
|
|
|
223 |
// the finance envision template
|
|
|
224 |
function displayEvoCommits (id, datafile) {
|
|
|
225 |
|
|
|
226 |
var
|
|
|
227 |
container = document.getElementById(id);
|
|
|
228 |
|
|
|
229 |
$.getJSON(datafile, function (history) {
|
|
|
230 |
|
|
|
231 |
var
|
|
|
232 |
V = envision,
|
|
|
233 |
firstMonth = history.id[0],
|
|
|
234 |
commits = [history.id,history.commits],
|
|
|
235 |
committers = [history.id,history.committers],
|
|
|
236 |
ratio = [history.id,history.ratio],
|
|
|
237 |
dates = history.date,
|
|
|
238 |
options, vis;
|
|
|
239 |
|
|
|
240 |
options = {
|
|
|
241 |
container : container,
|
|
|
242 |
data : {
|
|
|
243 |
price : commits,
|
|
|
244 |
volume : committers,
|
|
|
245 |
summary : commits
|
|
|
246 |
},
|
|
|
247 |
trackFormatter : function (o) {
|
|
|
248 |
|
|
|
249 |
var
|
|
|
250 |
// index = o.index,
|
|
|
251 |
data = o.series.data,
|
|
|
252 |
index = data[o.index][0]-firstMonth,
|
|
|
253 |
value;
|
|
|
254 |
|
|
|
255 |
value = dates[index] + ": " + commits[1][index] + " commits, " + committers[1][index] + " committers (commits per committer: " + ratio[1][index] + ")";
|
|
|
256 |
|
|
|
257 |
return value;
|
|
|
258 |
},
|
|
|
259 |
xTickFormatter : function (index) {
|
|
|
260 |
return Math.floor(index/12) + '';
|
|
|
261 |
},
|
|
|
262 |
yTickFormatter : function (n) {
|
|
|
263 |
return n + '';
|
|
|
264 |
},
|
|
|
265 |
// Initial selection
|
|
|
266 |
selection : {
|
|
|
267 |
data : {
|
|
|
268 |
x : {
|
|
|
269 |
min : history.id[0],
|
|
|
270 |
max : history.id[history.id.length - 1]
|
|
|
271 |
}
|
|
|
272 |
}
|
|
|
273 |
}
|
|
|
274 |
};
|
|
|
275 |
|
|
|
276 |
// Create the TimeSeries
|
|
|
277 |
vis = new envision.templates.Finance(options);
|
|
|
278 |
});
|
|
|
279 |
}
|
|
|
280 |
|