Untitled
const formatNumber = (num: number): string => { return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }; const metrics = [ { key: 'premium' as const, label: 'Premium', format: formatNumber }, { key: 'adequacy' as const, label: 'Adequacy', format: formatPercentage }, { key: 'rateOnLine' as const, label: 'Rate on Line', format: formatPercentage }, { key: 'ultimateLossRatio' as const, label: 'Ultimate Loss Ratio', format: formatPercentage } ];
Leave a Comment