import { isFiniteNumber } from '../../../../../common/utils/is_finite_number' ; import { Coordinate } from '../../../../../typings/timeseries' ; import { TimeFormatter } from '../../../../../common/utils/formatters' ; export function getResponseTimeTickFormatter ( formatter ) { return ( t ) => formatter ( t ) . formatted ; } export function getMaxY ( specs ? ) { const values = specs ?. flatMap ( ( spec ) => spec . data ) . map ( ( coord ) => coord . y ) . filter ( isFiniteNumber ) ; if ( values ?. length ) { return Math . max ( ... values , 0 ) ; } return 0 ; }