Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const computeValueScale = ({ width, height, axis, getValue, scale, data }) => {
const values = data.map(getValue)
const min = Math.min(...values)
const max = Math.max(...values)
return computeScale({ ...scale, axis }, { [axis]: { min, max } }, width, height)
}