diff --git a/apps/webapp/app/components/billing/ConcurrentRunsChart.tsx b/apps/webapp/app/components/billing/ConcurrentRunsChart.tsx index 5b9f335bf..060a85473 100644 --- a/apps/webapp/app/components/billing/ConcurrentRunsChart.tsx +++ b/apps/webapp/app/components/billing/ConcurrentRunsChart.tsx @@ -22,13 +22,20 @@ const tooltipStyle = { color: "#E2E8F0", }; +type DataItem = { date: Date; maxConcurrentRuns: number }; + +const dateFormatter = new Intl.DateTimeFormat("en-US", { + month: "short", + day: "numeric", +}); + export function ConcurrentRunsChart({ concurrentRunsLimit, data, hasConcurrencyData, }: { concurrentRunsLimit?: number; - data: { name: string; maxConcurrentRuns: number }[]; + data: DataItem[]; hasConcurrencyData: boolean; }) { return ( @@ -54,13 +61,28 @@ export function ConcurrentRunsChart({ fontSize={12} tickLine={false} axisLine={false} - dataKey="name" + dataKey={(item: DataItem) => { + if (item.date.getDate() === 1) { + return dateFormatter.format(item.date); + } + return `${item.date.getDate()}`; + }} className="text-xs" >