Commit 9b9c5940 authored by Daniel Kullmann's avatar Daniel Kullmann

Adds missing average plots to index.html

parent 1acf363e
......@@ -127,7 +127,7 @@
<button class="log-toggle">Linear scale (click to toggle)</button><br/>
<div class="plot img-fluid" id="new-cases-moving-average" style="width:600px;height:300px"></div>
<br/>
New number of cases (<span class="average-window"/>-days average)
New number of cases (<span class="average-window"></span>-days average)
</div>
</div>
<div class="col-md-6">
......@@ -135,7 +135,7 @@
<button class="log-toggle">Linear scale (click to toggle)</button><br/>
<div class="plot img-fluid" id="new-cases-per-1m-moving-average" style="width:600px;height:300px"></div>
<br/>
New number of cases per 1 million population (<span class="average-window"/>-days average)
New number of cases per 1 million population (<span class="average-window"></span>-days average)
</div>
</div>
</div>
......@@ -158,6 +158,26 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div>
<button class="log-toggle">Linear scale (click to toggle)</button><br/>
<div class="plot img-fluid" id="new-deaths-moving-average" style="width:600px;height:300px"></div>
<br/>
New number of deaths (<span class="average-window"></span>-days average)
</div>
</div>
<div class="col-md-6">
<div>
<button class="log-toggle">Linear scale (click to toggle)</button><br/>
<div class="plot img-fluid" id="new-deaths-per-1m-moving-average" style="width:600px;height:300px"></div>
<br/>
New number of deaths per 1 million population (<span class="average-window"></span>-days average)
</div>
</div>
</div>
</div>
</body>
</html>
......@@ -124,6 +124,10 @@ window.onload = function() {
"success": function(oResponse) {
oData = oResponse;
document.getElementById("now").innerText = oData.now;
var aAverageWindowTexts = document.getElementsByClassName("average-window");
for (var i = 0; i < aAverageWindowTexts.length; i++) {
aAverageWindowTexts.item(i).innerText = oData["average-window"];
}
createCountryList(oData.countries);
if (window.localStorage.corona) {
var mSavedData = JSON.parse(window.localStorage.corona);
......
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