Completely remove dependency on plotly, undecided as to whether I should refactor dashboard/people views so they render graphs statically rather then using htmx to fetch on load, probably a smarter move but too lazy atm

This commit is contained in:
Peter Stockings
2023-12-09 14:54:44 +11:00
parent e3435df8b5
commit 69e502ca01
2 changed files with 6 additions and 33 deletions

View File

@@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Workout Tracker</title>
<script src="/static/js/plotly-basic-2.20.0.min.js" defer></script>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap" rel="stylesheet" />
<link type="text/css" rel="stylesheet" href="/static/css/tail.select.min.css">
<script src="/static/js/tail.select.min.js"></script>
@@ -16,29 +15,6 @@
<script src="/static/js/hyperscript.min.js" defer></script>
<script src="/static/js/sweetalert2@11.js" defer></script>
<script>
function debounce(func, timeout = 300) {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => { func.apply(this, args); }, timeout);
};
}
window.addEventListener('resize', () => {
debounce(() => window.dispatchEvent(new Event('resize')))
})
</script>
<script>
let layout = {
margin: { t: 0 }, xaxis: { type: 'date', showgrid: false }, yaxis: {
title: 'Estimated 1RM (kg)',
showgrid: false
}
};
let config = { responsive: true, displayModeBar: false };
let hovertemplate = '<i>Estimated 1RM</i>: <b>%{y}kg</b><br><i>Topset</i>:<b>%{text}</b><br><i>Date</i>: <b>%{x}</b>';
</script>
</head>
<body>