diff --git a/js/year.js b/js/year.js index a34cf33..e195692 100644 --- a/js/year.js +++ b/js/year.js @@ -24,6 +24,17 @@ fetch(url).then(function(response) { } div.innerHTML += `${key} ` + stars + ` ${value.length}` + '\n'; } + div.innerHTML += '\n'; + div.innerHTML += 'Dataverse Installations by Over Time\n'; + let runningTotal = 0; + for (const [year, installations] of Object.entries(byYear)) { + runningTotal += installations.length; + let stars = ''; + for (let i = 0; i < runningTotal; i++) { + stars += '*'; + } + div.innerHTML += `${year} ${stars} ${runningTotal}\n`; + } if (byYear['????'].length > 0) { div.innerHTML += '\nInstallations with Unknown Launch Year\n'; for (const unknown of byYear['????']) {