Bump ver. Round failure rate.

This commit is contained in:
jude
2023-07-30 19:17:44 +01:00
parent d5fa8036e8
commit ea2cea573e
3 changed files with 5 additions and 5 deletions

View File

@ -14,12 +14,12 @@ document.addEventListener("DOMContentLoaded", () => {
(iv, frame) => iv + frame.count,
0
);
let rate = historyFailed / (historySent + historyFailed);
let formatted = Math.round(rate * 10000) / 100;
document.querySelector("#historySent").textContent = historySent;
document.querySelector("#historyFailed").textContent = historyFailed;
document.querySelector("#failRate").textContent = `${
(historyFailed / (historySent + historyFailed)) * 100
}%`;
document.querySelector("#failRate").textContent = `${formatted}%`;
new Chart(document.getElementById("schedule"), {
type: "bar",