import type { PanelData } from '../../../../../../common/types' ; export const calculateDomainForSeries = ( series ) => { const seriesData = series [ 0 ] ?. data || [ ] ; return seriesData ?. length ? { domainStart : seriesData [ 0 ] [ 0 ] , domainEnd : seriesData [ Math . max ( seriesData . length - 1 , 0 ) ] [ 0 ] , } : undefined ; } ;