Add switches to static card

This commit is contained in:
2024-05-07 22:44:48 +01:00
parent 9beae6c2fa
commit d656e06193
11 changed files with 65 additions and 24 deletions

View File

@@ -8,7 +8,6 @@ import { YAxis } from './y-axis';
const stepWindow = Number(import.meta.env.CLIENT_GRAPH_STEPS);
const stepPeriod = Number(import.meta.env.CLIENT_REFETCH_INTERVAL);
const xMargin = 4;
const fps = 30;
type Props = {
total: number;
@@ -33,7 +32,7 @@ export const CanvasChart = ({ total, hueOffset = 0, domain, hardDomain, data, fo
}
if (!domain || historyMax > domain[1]) {
return 1.25 * historyMax;
return historyMax;
}
return domain[1];
@@ -129,7 +128,7 @@ export const CanvasChart = ({ total, hueOffset = 0, domain, hardDomain, data, fo
drawSeries('fill');
drawSeries('stroke');
}, fps);
});
return (
<div className='chart'>