import boxplotImpl , { QuantileMethod as CustomQuantileMethod , quantilesFivenum , quantilesHigher , quantilesHinges , quantilesLinear , quantilesLower , quantilesMidpoint , quantilesNearest , quantilesType7 , } from '@sgratzl/boxplots' ; export { IBoxPlot , QuantileMethod as CustomQuantileMethod } from '@sgratzl/boxplots' ; const methodLookup = { hinges : quantilesHinges , fivenum : quantilesFivenum , type7 : quantilesType7 , quantiles : quantilesType7 , linear : quantilesLinear , lower : quantilesLower , higher : quantilesHigher , nearest : quantilesNearest , midpoint : quantilesMidpoint , } ; export type QuantilesMethod = 'hinges' | 'fivenum' | 'type7' | 'quantiles' | 'linear' | 'lower' | 'higher' | 'nearest' | 'midpoint' ; export interface BoxplotStatsOptions { default coef ? : number ; default quantiles ? : QuantilesMethod | CustomQuantileMethod ; default validAndSorted ? : boolean ; default whiskersMode ? : 'nearest' | 'exact' ; default eps ? : number ; } export function boxplot ( data , options = { } ) { const o = Object . assign ( { } , options as Omit < BoxplotStatsOptions , 'quantiles' > , { quantiles : ( typeof options . quantiles === 'function' || options . quantiles == null ? options . quantiles : methodLookup [ options . quantiles ! ] ! ) as CustomQuantileMethod , } ) ; if ( o . quantiles == null ) { delete ( o as any ) . quantiles ; } return boxplotImpl ( data , o ) ; }