move stats to left column
This commit is contained in:
parent
7e40f2b70a
commit
d61d21d483
@ -138,8 +138,8 @@ function updateStats(breaths) {
|
||||
totalBreathInMonth += value.length;
|
||||
daysCount += 1;
|
||||
}
|
||||
breathMonth.value = totalBreathInMonth;
|
||||
breathAverage.value = Math.ceil(totalBreathInMonth / daysCount);
|
||||
breathMonth.innerText = totalBreathInMonth;
|
||||
breathAverage.innerText = Math.ceil(totalBreathInMonth / daysCount);
|
||||
}
|
||||
|
||||
/* Внешний HTML Tooltip | Потом изменить */
|
||||
|
@ -32,22 +32,32 @@
|
||||
<option selected>Выбрать</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<p class="fs-5 fw-bold text-center mt-3 pt-3 border-top">Статистика</p>
|
||||
<div class="list-group">
|
||||
<label class="list-group-item d-flex gap-3">
|
||||
<span class="pt-1 form-checked-content">
|
||||
<strong>Вдыханий за месяц</strong>
|
||||
<small class="d-block text-body-secondary">
|
||||
<span id="breathMonth">...</span>
|
||||
</small>
|
||||
</span>
|
||||
</label>
|
||||
<label class="list-group-item d-flex gap-3">
|
||||
<span class="pt-1 form-checked-content">
|
||||
<strong>Среднее за сутки</strong>
|
||||
<small class="d-block text-body-secondary">
|
||||
<span id="breathAverage">...</span>
|
||||
</small>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-body-tertiary border rounded-3 p-3">
|
||||
<p class="fs-5 fw-bold text-center">График</p>
|
||||
<div class="mb-3 border-bottom">
|
||||
<canvas id="chart"></canvas>
|
||||
</div>
|
||||
<p class="fs-5 fw-bold text-center">Статистика</p>
|
||||
<div>
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text">Вдыханий за месяц</span>
|
||||
<input id="breathMonth" type="text" class="form-control" placeholder="Загрузка..." readonly />
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text">Среднее количество вдыханий за сутки</span>
|
||||
<input id="breathAverage" type="text" class="form-control" placeholder="Загрузка..." readonly />
|
||||
</div>
|
||||
<canvas id="chart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user