fix: remove rounding of axis limits (#3238)

This commit is contained in:
Yury Molodov 2022-10-18 09:47:58 +02:00 committed by Aliaksandr Valialkin
parent d0288ea417
commit 14c7223dc4
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

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 => {