Overview
In project management, visualizing task timelines is crucial for tracking progress and identifying dependencies. For our internal project management tool, we need a simple, interactive Gantt chart component to display the duration and schedule of various tasks. This problem focuses on building the core rendering logic for such a component.
What you need to do / Task
Your goal is to build a React component that displays a list of project tasks on a timeline, resembling a basic Gantt chart.
- Render a Date Header: Display a daily header for a predefined two-week period. Each day should be clearly visible.
- List Tasks: On the left side, list the names of all provided tasks.
- Visualize Task Durations: For each task, render a horizontal bar on the timeline corresponding to its
startDate and endDate. The bar's position and width should accurately reflect the task's duration and placement within the two-week timeline.
- Highlight Today: Visually distinguish the current date on the timeline header.
UI/UX expectations
- The overall layout should be a grid-like structure, with task names on the left and the timeline visualization on the right.
- Each day in the header should have a consistent width.
- Task bars should be easily distinguishable (e.g., different background color).
- The "Today" column should have a distinct background or border to highlight it.
- The component should be responsive enough to display all elements clearly within a reasonable viewport.
Acceptance criteria
- The date header shows all days from
START_DATE to END_DATE (inclusive).
- Each task from
mockTasks is listed on the left.
- Each task has a corresponding visual bar on the timeline.
- Task bars accurately start and end at their respective dates.
- The width of a task bar correctly represents its duration (e.g., a 3-day task is three times wider than a 1-day task).
- The current day's column in the header is visually distinct.