+ {/* Header row */}
+
+
Section
+
+
+ {Array.from({ length: Math.min(totalDays, 60) }).map((_, i) => (
+
+ ))}
+
+
+
+
+ {/* Section rows */}
+
+ {sections.map((section) => {
+ if (!section.targetDate) return null;
+
+ const sectionDate = new Date(section.targetDate);
+ const dayOffset = Math.max(
+ 0,
+ Math.round((sectionDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24))
+ );
+ const barWidth = Math.max(8, Math.min(100, (1 / Math.max(totalDays, 1)) * 100));
+
+ return (
+
+
+
+ {section.kind === 'milestone' ? 'M' : 'S'}
+
+ {section.name}
+
+
+
+ );
+ })}
+
+
+ {/* Project target date marker */}
+ {projectTargetDate && (
+
+ Target date
+ {new Date(projectTargetDate).toLocaleDateString()}
+
+ )}
+