in site/js/projects.js [1352:1407]
function drawAccountCreation(json) {
var i;
var j;
var narr = [];
var cdata = new google.visualization.DataTable();
cdata.addColumn('string', 'Date');
cdata.addColumn('number', 'New committers');
cdata.addColumn('number', 'Total number of committers');
var max = 0;
var jsort = [];
for (j in json) {
jsort.push(j);
}
jsort.sort();
var c = 0;
for (i in jsort) {
i = jsort[i];
var entry = json[i];
var arr = i.split("-");
var d = new Date(parseInt(arr[0]), parseInt(arr[1]), 1);
c += entry;
narr.push([i, entry, c]);
max = (max < entry) ? entry : max;
}
cdata.addRows(narr);
var options = {
title: ('Account creation timeline'),
backgroundColor: 'transparent',
height: 320,
width: 1160,
vAxes:[
{title: 'New accounts', titleTextStyle: {color: '#0000DD'}, maxValue: Math.max(200,max)},
{title: 'Total number of accounts', titleTextStyle: {color: '#DD0000'}},
],
series: {
1: {type: "line", pointSize:3, lineWidth: 3, targetAxisIndex: 1},
0: {type: "bars", targetAxisIndex: 0}
},
seriesType: "bars",
tooltip: {isHtml: true}
};
var obj = document.createElement('div');
obj.style = "float: left; width: 1160px; height: 450px;";
obj.setAttribute("id", 'accountchart');
var contents = document.getElementById('contents');
contents.innerHTML = "<h1>Timelines</h1>";
contents.appendChild(obj);
var chart = new google.visualization.ComboChart(obj);
chart.draw(cdata, options);
}