feat: round max on delay graph
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user