Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshahlawat committed Apr 26, 2020
1 parent 3adfa33 commit 1d6a3ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions App.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@
2020
</div>
</div>
<div class="data-entry">
<div class="data-entry-title">
Monthly Energy Consumption (kWh)
</div>
<div id="consumption" class="data-entry-value">
2020
</div>
</div>
<div class="data-entry">
<div class="data-entry-title">
Savings after 25 years (CAD)
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ function yesClick() {
console.log("Monthly Savings After SP: $" + monthlySavingsAfterSP);
console.log("Yearly Savings After SP: $" + yearlySavingsAfterSP);
document.getElementById("energy-produced").innerHTML = `${Math.trunc(monthlyEnergyProduced)}`;
document.getElementById("savings").innerHTML = `${Math.trunc(yearlySavingsAfterSP*25)}`;
document.getElementById("savings").innerHTML = `$${Math.trunc(yearlySavingsAfterSP*25)}`;
document.getElementById("consumption").innerHTML = `${Math.trunc(kWh)}`;

var costYearlySavingsChart = new Chart(costYearlySavings, {
type: 'doughnut',
data: {
Expand Down

0 comments on commit 1d6a3ef

Please sign in to comment.