import type { LatencyCorrelationsResponse } from '../../../../../common/correlations/latency_correlations/types' ; import { FETCH_STATUS } from '../../../../hooks/use_fetcher' ; export function getOverallHistogram ( data , isRunning ) { const overallHistogram = data . overallHistogram === undefined && ! isRunning ? [ ] : data . overallHistogram ; const hasData = Array . isArray ( overallHistogram ) && overallHistogram . length > 0 ; const status = Array . isArray ( overallHistogram ) ? FETCH_STATUS . SUCCESS : FETCH_STATUS . LOADING ; return { overallHistogram , hasData , status } ; }