Chart Utilities
bklit-ui/chart-utilsFreeUtility
Shared Intl formatters, time-series decimation, and RAF tooltip scheduling for Bklit charts
Install it
npx shadcn@latest add https://bklit.com/r/chart-utils.jsonSource
1export const shortDateFmt = new Intl.DateTimeFormat("en-US", {2 month: "short",3 day: "numeric",4});56export const weekdayDateFmt = new Intl.DateTimeFormat("en-US", {7 weekday: "short",8 month: "short",9 day: "numeric",10});1112export const hmsTimeFmt = new Intl.DateTimeFormat("en-US", {13 hour: "2-digit",14 minute: "2-digit",15 second: "2-digit",16 hour12: false,17});1819// `Intl.NumberFormat.prototype.format` is a bound getter — safe to extract.20export const intFmt = new Intl.NumberFormat("en-US").format;
