interface CommitsByDateProps { commits: Array<{ date: string; count: number }>; className?: string; } export function CommitsByDateChart({ commits, className }: CommitsByDateProps) { const sortedCommits = [...commits].sort( (a, b) => new Date(a.date).getTime() - new Date(b.date).getTime() ); const maxValue = Math.max(...sortedCommits.map(c => c.count), 1); return (

Commits par date

{sortedCommits.map((commit, idx) => { const height = (commit.count / maxValue) * 100; const date = new Date(commit.date); const label = date.toLocaleDateString("fr-FR", { day: "2-digit", month: "short" }); return (
{commit.count > 0 ? commit.count : ''}
0 ? '24px' : '0' }} title={`${label}: ${commit.count} commits`} /> {label}
); })}
); }