Skip to content

Commit

Permalink
Replace year with age
Browse files Browse the repository at this point in the history
  • Loading branch information
gurbindersingh committed Oct 19, 2024
1 parent f063298 commit 6050d7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ <h3 class="is-sr-only">Chart</h3>
<div id="chart-container" class="column"></div>
<h3 class="is-sr-only">Data table</h3>
<details class="my-6">
<summary>Toggle table</summary>
<summary id="table-toggle">Toggle table</summary>
<table class="table m-auto">
<caption class="is-sr-only">
A table containing the same data as the chart
</caption>
<thead>
<tr>
<th>Year</th>
<th>Age</th>
<th>Investments/Savings</th>
<th>Income</th>
<th>Living costs</th>
Expand Down
2 changes: 1 addition & 1 deletion src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function renderTable(data: PlotData[]) {
.map(
(row: PlotData) =>
`<tr>
<td>${row.year}</td>
<td>${row.age}</td>
<td>${Math.round(row.investments)}</td>
<td>${Math.round(row.income)}</td>
<td>${Math.round(row.livingCosts)}</td>
Expand Down
4 changes: 4 additions & 0 deletions src/style/main.css
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
@import "./bulma.css";

#table-toggle {
cursor: pointer;
}

0 comments on commit 6050d7c

Please sign in to comment.