Commit 147f5818 authored by Daniel Kullmann's avatar Daniel Kullmann

Removes code dealing with logarithmic display of plots.

parent ce141a16
......@@ -19,6 +19,10 @@
[class*="col-"] {
padding: 1rem;
}
.log-toggle {
display: none;
}
</style>
<script src="./lib/jquery.min.js"></script>
......
......@@ -74,22 +74,6 @@ function toggleCountrySelection() {
}
}
function toggleLogScaleValueOfPlot(oElement) {
// TODO toggle between linear and log scale
}
function toggleLogScale(oEvent) {
var oParent = oEvent.target.parentElement;
var sText = oEvent.target.innerText;
if (sText.indexOf("Linear") != 0) {
sText = "Linear scale (click to toggle)";
} else {
sText = "Logarithmic scale (click to toggle)";
}
oEvent.target.innerText = sText;
toggleLogScaleValueOfPlot(oParent.getElementsByTagName("div")[0]);
}
function addCountry(sCountry) {
$("#"+sCountry).attr("checked", true);
aCountries = [];
......@@ -135,23 +119,12 @@ function createCountryList(mCountries) {
window.onload = function() {
var mPlotOptions = {};
var aButtons = document.getElementsByTagName("button");
for (let oElement of aButtons) {
if (oElement.className === "log-toggle") {
oElement.onclick = toggleLogScale;
}
};
// TODO: Decide whether to support log-scale display of plots
Array.from(document.getElementsByClassName("log-toggle")).forEach(oElement => {
oElement.style.display = "none";
});
$.ajax({
"url": "./data.json?t="+new Date().getTime(),
"success": function(oResponse) {
oData = oResponse;
document.getElementById("now").innerText = oData.now;
createCountryList(oData.countries);
// TODO: Set some default countries
if (window.localStorage.corona) {
var mSavedData = JSON.parse(window.localStorage.corona);
mSavedData.countries.forEach(sCountry => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment