Commit 92ad69ef authored by Michał Woźniak's avatar Michał Woźniak
Browse files

active cases graph added

parent ade8b8b6
Pipeline #152 passed with stage
in 1 second
......@@ -662,10 +662,14 @@ let calculateDeltas = (data) => {
cur.new_confirmed = 0;
cur.new_recovered = 0;
cur.new_deaths = 0;
cur.active = 0;
cur.new_active = 0;
} else {
cur.new_confirmed = cur.confirmed - d[i-1].confirmed
cur.new_recovered = cur.recovered - d[i-1].recovered
cur.new_deaths = cur.deaths - d[i-1].deaths
cur.active = cur.confirmed - (cur.recovered + cur.deaths)
cur.new_active = cur.active - d[i-1].active
}
return cur;
})
......
......@@ -214,6 +214,7 @@
.chart-config-container input#chart-data-confirmed:checked ~ .chart-config-group label[for=chart-data-confirmed],
.chart-config-container input#chart-data-recovered:checked ~ .chart-config-group label[for=chart-data-recovered],
.chart-config-container input#chart-data-deaths:checked ~ .chart-config-group label[for=chart-data-deaths],
.chart-config-container input#chart-data-active:checked ~ .chart-config-group label[for=chart-data-active],
.chart-config-container input#chart-type-logarithmic:checked ~ .chart-config-group label[for=chart-type-logarithmic],
.chart-config-container input#chart-type-linear:checked ~ .chart-config-group label[for=chart-type-linear],
.chart-config-container input#chart-cases-cumulative:checked ~ .chart-config-group label[for=chart-cases-cumulative],
......@@ -302,6 +303,7 @@
<input type="radio" id="chart-data-confirmed" name="chart-data" value="confirmed" checked="checked"/>
<input type="radio" id="chart-data-recovered" name="chart-data" value="recovered"/>
<input type="radio" id="chart-data-deaths" name="chart-data" value="deaths"/>
<input type="radio" id="chart-data-active" name="chart-data" value="active"/>
<input type="radio" id="chart-type-logarithmic" name="chart-type" value="logarithmic" checked="checked"/>
<input type="radio" id="chart-type-linear" name="chart-type" value="linear"/>
<input type="radio" id="chart-cases-cumulative" name="chart-cases" value="cumulative" checked="checked"/>
......@@ -317,6 +319,7 @@
<label for="chart-data-confirmed">confirmed cases</label>
<label for="chart-data-recovered">recoveries</label>
<label for="chart-data-deaths">deaths</label>
<label for="chart-data-active">active cases</label>
</div>
<div class="chart-config-group">
<p>Scale:</p>
......
Supports Markdown
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