fix: remove rounding of axis limits (#3238)

This commit is contained in:
Yury Molodov 2022-10-18 09:47:58 +02:00 committed by GitHub
parent 069401a304
commit 080562030d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ export const getMinMaxBuffer = (min: number | null, max: number | null): [number
}
const valueRange = Math.abs(max - min) || Math.abs(min) || 1;
const padding = 0.02*valueRange;
return [Math.floor(min - padding), Math.ceil(max + padding)];
return [min - padding, max + padding];
};
export const getLimitsYAxis = (values: { [key: string]: number[] }): AxisRange => {