Skip to content

Commit

Permalink
Merge pull request #85 from PaulBoon/79-Make-MakeDataCount-Optional
Browse files Browse the repository at this point in the history
Issue 79: Making configurable if Make Data Count is rendered
  • Loading branch information
qqmyers authored Jun 13, 2023
2 parents af6eff5 + 4d331cd commit 981faf9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
3 changes: 2 additions & 1 deletion config.local.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dataverseTerm": "Dataverse",
"datasetTerm": "Dataset",
"downloadsHeader": "Downloads",
"makeDataCount": true,
"makeDataCountHeader": "Make Data Count",
"holdingsHeader": "Holdings",
"timeseries.dataverses.definition":"Total Number of published Dataverses as a function of time.",
Expand Down Expand Up @@ -46,4 +47,4 @@
"makeDataCount/viewsUnique/monthly": "#224F20",
"makeDataCount/downloadsUnique/monthly": "#b22200"
}
}
}
20 changes: 13 additions & 7 deletions installationplots.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,19 @@ $(document).ready(function() {
multitimeseries("UniqueDownloads", config, "pid");
//Row 7 - by Count and by Size graphs
filesByType(config);
//Row 8
makeDataCount("viewsTotal", config);
makeDataCount("downloadsTotal", config);
//Row 9
makeDataCount("viewsUnique", config);
makeDataCount("downloadsUnique", config);


// Use MDC by default, is backwards compatible
if (!config.hasOwnProperty("makeDataCount") || config.makeDataCount) {
//Row 8
makeDataCount("viewsTotal", config);
makeDataCount("downloadsTotal", config);
//Row 9
makeDataCount("viewsUnique", config);
makeDataCount("downloadsUnique", config);
} else {
// No MDC
$("#mdcSection").parent().hide();
}
});
});

Expand Down

0 comments on commit 981faf9

Please sign in to comment.