feat: round max on delay graph

This commit is contained in:
2026-08-12 12:23:08 +02:00
parent 5945b48b98
commit eb751f9404
@@ -79,6 +79,7 @@ function DelayGraph({
unit: DelayUnit; unit: DelayUnit;
}) { }) {
const [min, max] = DELAY_RANGES[unit]; const [min, max] = DELAY_RANGES[unit];
const roundedMax = (Math.floor(max / 100) + 1) * 100;
const labelByX = useMemo(() => { const labelByX = useMemo(() => {
const map = new Map<number, string>(); const map = new Map<number, string>();
rows.forEach((row, i) => map.set(i + 1, row.label)); rows.forEach((row, i) => map.set(i + 1, row.label));
@@ -93,7 +94,7 @@ function DelayGraph({
xMax={rows.length + 0.5} xMax={rows.length + 0.5}
xStep={1} xStep={1}
yMin={min} yMin={min}
yMax={max} yMax={roundedMax}
xLabel="Channel" xLabel="Channel"
yLabel={UNIT_LABEL[unit]} yLabel={UNIT_LABEL[unit]}
showGrid={true} showGrid={true}