import { ViewPort } from '../../../utils/dataTypes' ; /**
 * Get Pixel Density in terms of the clip space
 *
 * Returns the ratio of model space to pixel space in each dimension.
 * i.e. how many pixels does 10 minutes represent on a given `container`?
 */ export const pixelDensity = ( { viewport : { end , start , yMax , yMin } , toClipSpace , size , } ) => { const { width , height } = size ; const x = Math . abs ( ( toClipSpace ( end . getTime ( ) ) - toClipSpace ( start . getTime ( ) ) ) / width ) ; const y = Math . abs ( ( yMax - yMin ) / height ) ; return { x , y } ; } ;