Skip to main content

7. Timeline Chart (Gantt)

7.1 Gantt Visualization​

Purpose: Visualize project phases and milestones over time.

Timeline Chart Structure Diagram​

Key Features:

  • Phase bars - Color-coded progress visualization (green=complete, blue=active, gray=pending)
  • Milestones - Diamond markers (β—†) for key deliverables
  • Today indicator - Vertical line showing current date position
  • Zoom controls - Switch between Day/Week/Month views
  • Interactive - Click bars to see phase details, hover for tooltips

Visual Legend:

  • β–ˆ Complete (green) - 100% done
  • β–ˆ In Progress (blue) - Active work
  • β–‘ Not Started (gray) - Future work
  • β—† Milestone - Key deliverable/checkpoint
  • β”‚ Today - Current date indicator

Full Specification:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Timeline Chart [Today: Dec 1] β”‚
β”‚ Zoom: [Day] [Week βœ“] [Month] | Filter: [All Projects β–Ό] β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚Nov 15β”‚Nov 22β”‚Nov 29β”‚Dec 6 β”‚Dec 13β”‚Dec 20β”‚Dec 27β”‚Jan 3β”‚Jan 10β”‚
β”‚ β”‚ β”‚ β”‚ ↓ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ β”‚TODAY β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€
β”‚ Phase 0 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ βœ… COMPLETE β”‚
β”‚ Foundation Nov 1 ────── Nov 16 β”‚
β”‚ 350 tasks β€’ 100% complete β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Phase 1 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 78% β”‚
β”‚ Beta Testing Nov 18 ────────────────────────── Feb 15 β”‚
β”‚ 530 tasks β€’ 415 complete β€’ 115 in progress β”‚
β”‚ β—† Beta Analysis (Dec 10) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dashboard 2.0 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0% β”‚
β”‚ Dec 2 ───────────── Jan 31 β”‚
β”‚ 80 tasks β€’ 0 complete β€’ 0 in progress β”‚
β”‚ β—† Quick Wins (Dec 6) β”‚
β”‚ β—† Sprint 1 (Dec 20) β”‚
β”‚ β—† Sprint 2 (Jan 17) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Phase 2 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘ 0% β”‚
β”‚ Pilot Feb 15 ───── Mar 15 β”‚
β”‚ 120 tasks β€’ 0 complete β”‚
β”‚ β—† Pilot Launch (Feb 15) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Phase 3 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ 0% β”‚
β”‚ GTM Mar 15 ─ May 15 β”‚
β”‚ 90 tasks β”‚
β”‚ β—† Public GTM β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Legend: β–ˆ Complete β–‘ Remaining β—† Milestone β”‚ Today

7.2 Implementation Prompt - Timeline Chart​

Prompt for AI/Developer:

Create a Gantt-style timeline chart showing project phases and milestones over time.

LAYOUT:
- Container: Full width, responsive
- Header: Zoom controls + date range display + filters
- Time axis: Horizontal, shows date labels based on zoom level
- Rows: 1 row per phase/project, stacked vertically
- Today indicator: Vertical line showing current date

TIME AXIS:
Zoom Levels:
- Day: Show each day as column (e.g., "Mon 1", "Tue 2")
- Week: Show each week as column (e.g., "Nov 15", "Nov 22")
- Month: Show each month as column (e.g., "Nov", "Dec", "Jan")

Default: Week zoom

Time Scale:
- Calculate: Auto-fit date range from earliest start to latest end
- Padding: Add 1 week before/after for context
- Grid lines: Vertical lines for each time unit (light gray, 1px)

HTML Structure:
<div class="timeline-chart">
<div class="timeline-header">
<div class="zoom-controls">
<button data-zoom="day">Day</button>
<button data-zoom="week" class="active">Week</button>
<button data-zoom="month">Month</button>
</div>
<div class="date-range">Nov 1, 2025 - May 15, 2026</div>
<select class="project-filter">
<option value="all">All Projects</option>
<option value="core">Core</option>
<option value="cloud">Cloud</option>
</select>
</div>

<div class="timeline-axis">
<div class="axis-label" style="left: 0%">Nov 15</div>
<div class="axis-label" style="left: 7%">Nov 22</div>
<!-- More labels -->
</div>

<div class="timeline-rows">
<div class="timeline-row" data-phase="phase-0">
<div class="row-label">
<div class="phase-name">Phase 0</div>
<div class="phase-subtitle">Foundation</div>
<div class="phase-stats">350 tasks β€’ 100%</div>
</div>
<div class="row-bar-container">
<div class="row-bar complete" style="left: 0%; width: 10%;">
<div class="bar-fill"></div>
<div class="bar-label">βœ… COMPLETE</div>
</div>
<div class="date-label start">Nov 1</div>
<div class="date-label end">Nov 16</div>
</div>
</div>
<!-- More rows -->
</div>

<div class="today-indicator" style="left: 20%">
<div class="today-line"></div>
<div class="today-label">TODAY</div>
</div>
</div>

CSS:
.timeline-chart {
position: relative;
background: var(--white);
border: 1px solid var(--gray-300);
border-radius: 8px;
padding: 24px;
overflow-x: auto;
}

.timeline-axis {
position: relative;
height: 40px;
border-bottom: 2px solid var(--gray-900);
margin-bottom: 16px;
}

.axis-label {
position: absolute;
top: 0;
transform: translateX(-50%);
font-size: 12px;
font-weight: 600;
color: var(--gray-700);
}

.timeline-rows {
position: relative;
display: flex;
flex-direction: column;
gap: 24px;
}

.timeline-row {
display: flex;
align-items: center;
gap: 16px;
min-height: 80px;
}

.row-label {
width: 150px;
flex-shrink: 0;
}

.phase-name {
font-size: 16px;
font-weight: 600;
color: var(--gray-900);
}

.phase-subtitle {
font-size: 14px;
color: var(--gray-700);
}

.phase-stats {
font-size: 12px;
color: var(--gray-500);
margin-top: 4px;
}

.row-bar-container {
position: relative;
flex: 1;
height: 60px;
}

.row-bar {
position: absolute;
height: 40px;
background: var(--gray-300);
border-radius: 4px;
display: flex;
align-items: center;
padding: 0 12px;
cursor: pointer;
transition: all 0.2s;
}

.row-bar:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.row-bar.complete {
background: linear-gradient(90deg, #00A651, #00D668);
}

.row-bar.in-progress {
background: linear-gradient(90deg, #0066CC, #3399FF);
}

.row-bar.not-started {
background: var(--gray-300);
}

.bar-fill {
position: absolute;
left: 0;
top: 0;
bottom: 0;
background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
border-radius: 4px 0 0 4px;
}

.bar-label {
position: relative;
font-size: 12px;
font-weight: 600;
color: var(--white);
text-shadow: 0 1px 2px rgba(0,0,0,0.3);
z-index: 1;
}

.date-label {
position: absolute;
font-size: 11px;
color: var(--gray-700);
}

.date-label.start {
top: -20px;
left: 0;
}

.date-label.end {
top: -20px;
right: 0;
}

.today-indicator {
position: absolute;
top: 80px;
bottom: 0;
width: 2px;
z-index: 10;
pointer-events: none;
}

.today-line {
width: 2px;
height: 100%;
background: var(--primary-blue);
}

.today-label {
position: absolute;
top: -30px;
left: 50%;
transform: translateX(-50%);
background: var(--primary-blue);
color: var(--white);
padding: 4px 8px;
border-radius: 3px;
font-size: 11px;
font-weight: 600;
white-space: nowrap;
}

CALCULATIONS:
Calculate Bar Position:
- Total days: end_date - start_date of entire timeline
- Phase start offset: (phase_start - timeline_start) / total_days * 100%
- Phase width: (phase_end - phase_start) / total_days * 100%

Calculate Today Position:
- today_offset: (today - timeline_start) / total_days * 100%

Calculate Completion Fill:
- fill_width: (complete_count / total_count) * bar_width

MILESTONES:
Display milestones as diamond markers (β—†) below phase bars
- Position: Calculate percentage along timeline
- Label: Milestone name + date
- Click: Show milestone details in popover

HTML for Milestone:
<div class="milestone" style="left: 15%">
<span class="milestone-marker">β—†</span>
<span class="milestone-label">Beta Analysis (Dec 10)</span>
</div>

CSS:
.milestone {
position: absolute;
top: 50px;
transform: translateX(-50%);
}

.milestone-marker {
font-size: 20px;
color: var(--primary-blue);
}

.milestone-label {
position: absolute;
top: 25px;
left: 50%;
transform: translateX(-50%);
font-size: 11px;
color: var(--gray-700);
white-space: nowrap;
background: var(--white);
padding: 2px 6px;
border-radius: 3px;
border: 1px solid var(--gray-300);
}

INTERACTIONS:
Click Phase Bar:
- Show phase detail modal with:
- Phase name, dates, duration
- Task breakdown (total, complete, in progress, pending)
- Progress chart (pie or bar)
- Key deliverables
- Assigned team members
- [View Tasks] button β†’ Navigate to task list filtered by phase

Hover Phase Bar:
- Show tooltip with quick stats
- Highlight connected milestones

Drag Phase Bar (Advanced):
- Drag to reschedule phase
- Validate: Can't move before dependencies complete
- Update: Save new dates to database, recalculate dependent phases

ZOOM BEHAVIOR:
- Click zoom button: Recalculate time scale, re-render axis and bars
- Smooth animation: 300ms ease transition for bar positions
- Persist: Save zoom level in localStorage

RESPONSIVE:
Desktop (β‰₯1024px): Full timeline, horizontal scroll if needed
Tablet (768px-1023px): Reduce label widths, smaller fonts
Mobile (<768px): Vertical timeline (bars stack vertically, dates on left)

DATA SOURCE:
- Fetch from data/projects-with-milestones.json
- Calculate dates, durations, completion percentages
- Sort phases by start_date (ascending)

ACCESSIBILITY:
- Keyboard: Tab through phases, Enter to open detail modal
- ARIA: aria-label for bars ("Phase 0: 100% complete, Nov 1 to Nov 16")
- Focus: Visible outline on focused bars
- Screen reader: Announce phase progress on focus