diff --git a/nextjs-app/components/PerformanceChart.tsx b/nextjs-app/components/PerformanceChart.tsx index 79a2f7a..6978789 100644 --- a/nextjs-app/components/PerformanceChart.tsx +++ b/nextjs-app/components/PerformanceChart.tsx @@ -40,7 +40,11 @@ interface PerformanceChartProps { export function PerformanceChart({ data, schoolName, isSecondary = false }: PerformanceChartProps) { // Sort data by year const sortedData = [...data].sort((a, b) => a.year - b.year); - const years = sortedData.map(d => d.year.toString()); + const formatYear = (y: number) => { + const s = y.toString(); + return s.length === 6 ? `${s.slice(0, 4)}/${s.slice(4)}` : s; + }; + const years = sortedData.map(d => formatYear(d.year)); // Prepare datasets — phase-aware const datasets = isSecondary ? [