Gantt Chart
Horizontal bars on a timeline that show when tasks start, how long they last, and how they depend on each other — the classic project-scheduling visualization, used everywhere from construction sites to software releases since 1910.
// 01 — The chart
What it looks like
A Gantt chart for a website relaunch. Each bar is a task; colour encodes the workstream; the diamond marks the launch milestone and the dashed line is “today”.
// 02 — Definition
What is a Gantt chart?
A Gantt chart is a horizontal bar chart plotted against a calendar axis. Each row represents a task or activity in a project; each bar represents that task’s duration. The bar’s left edge marks the start date, its right edge marks the end date, and its width encodes the elapsed working time between them. Tasks are listed top-to-bottom on the y-axis, usually grouped under summary bars that mirror the project’s work-breakdown structure.
What makes Gantt charts unique among bar charts is the second layer of meaning: dependencies. Most projects have tasks that cannot start until others finish — you can’t pour a foundation before the site is excavated, you can’t test a feature before it’s built. Gantt charts draw these relationships as arrows from one bar to the next. The longest chain of dependent tasks is the critical path, the sequence whose total duration sets the project’s end date. Any slip on a critical-path task slips the entire project, so most Gantt tools render the critical path in a distinct colour and let project managers protect it.
Gantt charts also support several other layers that turn the visualization into a planning tool rather than a static picture. Milestones are zero-duration events drawn as diamond markers — design sign-off, beta launch, regulatory approval. Progress fills shade each bar to its current percent-complete, turning the Gantt into a status board the moment work begins. Resource encoding colours bars by team or assignee so a project manager can spot over-allocations. And the calendar axis itself can run from days for a sprint to years for a construction programme — the chart shape stays the same; only the granularity changes.
The trade-off for that expressiveness is overhead. A Gantt chart only earns its keep when the project has clear tasks, real dependencies, and an end date worth defending. Push it onto a 200-task portfolio or onto open-ended operational work and it becomes a wall of bars nobody reads. The rest of this guide is about how to live inside the Gantt chart’s sweet spot — and how to recognise when you’ve walked outside it and a kanban board, a timeline, or a burndown chart would communicate faster.
Origin: Polish engineer Karol Adamiecki invented the format — he called it a harmonogram — in 1896. Henry Gantt independently re-developed and popularised the chart between 1910 and 1915 while consulting on U.S. Army Ordnance production schedules during World War I, and his name stuck. The format has been the default for project scheduling for more than a century.
// 03 — When to use
When a Gantt chart is the right call
Reach for a Gantt chart when the question is “when will this finish, and what depends on what?” It rewards projects with a clear scope, a fixed end date, and dependencies worth tracking.
- Planning or tracking a project with clearly defined tasks, start dates, and end dates
- Dependencies and the critical path matter — you need to see what blocks what
- You want to communicate a single shared timeline to stakeholders or teams
- Tracking percent complete and planned-vs-actual progress over weeks or months
- The project has 10–50 tasks that fit comfortably on a printable page
- You need to spot resource over-allocations across teams or workstreams
- Coordinating multi-disciplinary work where milestones must align (regulatory, marketing, engineering)
// 04 — When not to use
When a Gantt chart is the wrong call
A Gantt chart can technically display almost any list of dated work, but “technically possible” is not the same as “good idea.” Below are the cases where a Gantt actively hides information you need to communicate.
- You have hundreds of tasks — the chart becomes an unreadable wall of bars
- Tasks have no clear start or end dates (e.g. ongoing maintenance, support queues)
- The audience only needs a one-page status — a milestone or burndown chart is faster
- Work is highly iterative and re-prioritised every sprint — a kanban board fits better
- You want to compare data magnitudes — Gantts encode time, not quantity
- The project is a single long task with no internal structure — use a progress bar
- You can’t commit to weekly re-baselining — a stale Gantt is worse than no chart
- You’re visualising the dependency network itself — use a PERT chart and add a Gantt on top
// 05 — Data requirements
What your data needs to look like
Before building the chart, your dataset needs to fit a specific shape. Use this checklist to confirm yours does.
Shape
One row per task, with a start date, end date or duration, and optional dependency, progress, and resource columns.
Minimum rows
2 tasks. With one row a Gantt chart is just a single bar — use a progress indicator instead.
Maximum rows
~50 tasks per view. Past that, group sub-tasks into summary bars and let readers expand the level of detail they need.
A short, unique label for each row of work. Use action-oriented phrases (“Write copy”, not “Copy”) and keep names under ~40 characters so they fit the left axis without truncation.
The planned start date of the task. Store as ISO-8601 (YYYY-MM-DD) so every tool parses it correctly. For sub-day tasks include the time component.
The planned finish date. Many tools accept either an end date or a duration (number of working days) — pick one and stay consistent across the dataset.
A comma-separated list of predecessor task IDs that must finish before this task can start. Used by Gantt tools to draw dependency arrows and compute the critical path.
Percent complete, rendered as a darker fill inside the task bar. Update at least weekly during execution; a stale progress field is worse than no progress field.
Owner, team, or workstream. Used to colour-code bars or to filter the chart by responsible person. Combine with patterns or labels so the encoding survives without colour.
| task | start | end | dependencies | progress | resource |
|---|---|---|---|---|---|
| Discovery | 2026-01-06 | 2026-01-23 | 100 | Research | |
| Wireframes | 2026-01-19 | 2026-02-06 | 1 | 100 | Design |
| Visual design | 2026-02-02 | 2026-03-06 | 2 | 80 | Design |
| Build | 2026-02-23 | 2026-04-10 | 3 | 55 | Engineering |
| Content | 2026-02-09 | 2026-03-27 | 2 | 65 | Content |
| QA | 2026-03-30 | 2026-04-24 | 4 | 0 | Engineering |
| Launch prep | 2026-04-20 | 2026-05-08 | 5,6 | 0 | PM |
Tip: always store dates in ISO-8601 (YYYY-MM-DD) so every tool parses them correctly. The dependencies column should hold predecessor task IDs (or row numbers) separated by commas; this is what lets the tool draw arrows and compute the critical path.
// 06 — Anatomy
Parts of a Gantt chart
Every Gantt chart is built from the same handful of parts: a vertical task list, a horizontal calendar, the bars themselves, and the optional dependency arrows, milestones, and progress fills layered on top.
// 07 — Step-by-step
Step-by-step: how to build a good Gantt chart
A nine-step recipe that works in any tool. The discipline is the same whether you build the chart in Microsoft Project, in Excel, or by hand-coding D3 — skip steps and the schedule usually shows it.
- 1
Define the project scope and end date
Write the project goal in one sentence and pin the target end date. Without a fixed end the Gantt has no edge to anchor against, and the dependency chain has nothing to push back on. The scope sentence becomes the chart’s title. - 2
Build the work-breakdown structure
Decompose the project into 10–50 tasks grouped by phase or workstream. Each task should be small enough to estimate in days, large enough to mean something to a stakeholder. Group sub-tasks under summary bars so readers can choose their level of detail. - 3
Estimate duration for each task
For every leaf task, capture a realistic duration in working days. Resist the temptation to estimate in calendar days — weekends and holidays will silently drift the schedule. Use ranges for new work and pin firm numbers as you learn. - 4
Map dependencies between tasks
For each task list its predecessor IDs. Most dependencies are finish-to-start (the next task starts when the previous one ends) but Gantt tools also support start-to-start, finish-to-finish, and lag/lead times for overlapping work. - 5
Schedule from the dependency network
Let the tool roll the dependencies forward to compute each task’s start and end. Resist the urge to hand-place bars on the calendar — the moment any task moves you lose the dependency logic and the schedule stops being a plan. - 6
Identify the critical path and milestones
The critical path is the longest chain of dependent tasks; any slip on it slips the whole project. Mark it visually (most tools use red bars). Insert milestone diamonds for fixed deadlines like reviews, launches, or external commitments. - 7
Assign resources and balance load
Add an owner to every task and check the resulting workload per person. If anyone is loaded above 100% in a given week, either re-sequence tasks, split the work, or re-negotiate scope before publishing the chart. - 8
Annotate, format, and ship
Reverse the y-axis so tasks read top-down. Format the date axis with sensible tick marks (weeks for short projects, months for longer). Add a title that states the project end date, and a caption with the snapshot date so readers know when the plan was last updated. - 9
Update the plan as work happens
A Gantt chart is a living document. Re-baseline weekly: mark percent complete on each bar, slide unfinished tasks forward, and recalculate the critical path. A static, three-month-old Gantt chart is a fiction — worse than no chart at all.
// 08 — Real-world examples
Where you’ll see Gantt charts used
Gantt charts show up in four places more than anywhere else: construction, software, manufacturing, and event planning. Each context has its own conventions, and they all reward the same fundamentals.
Construction: Skyscraper build schedule
Civil-engineering programmes are the original use case. A 50-floor tower is broken into a thousand tasks (excavation, foundations, structural steel, MEP, fit-out) grouped under summary bars per floor and per trade. Critical-path bars are protected with weather and material buffers; milestones mark inspection dates and floor toppings.
ConstructionSoftware: Quarterly release plan
A product team plans a major release across discovery, design, build, content, QA, and launch workstreams. Bars are colour-coded by team, dependency arrows link API contracts to client work, and a today line tracks live progress against the plan. The chart is re-baselined every Monday from the sprint board.
SoftwareManufacturing: Production ramp
An automotive supplier coordinates tooling, supplier qualification, line installation, and pilot production for a new component. A Gantt chart aligns the cross-functional teams — engineering, procurement, quality, operations — around a fixed Job-One date that customers have already publicised.
ManufacturingEvents: Conference run-of-show
Conference organisers use Gantt charts to coordinate venue contracts, speaker recruitment, marketing, registration, and on-site logistics across the 9–12 months before an event. Each bar maps to an owner; milestones mark the call-for-papers close, the early-bird deadline, and load-in.
Event Planning// 09 — Variations
Types of Gantt charts
The basic Gantt has several important variants, each suited to slightly different project situations. Pick the variant whose strengths match your question.
Classic Gantt
A bar per task, dates on the x-axis, optional dependency arrows. The default for project plans of every size.
Summary Gantt (WBS)
Roll-up bars represent phases or workstreams; leaf tasks indent underneath. Lets readers choose their level of detail.
Baseline vs actual Gantt
A pale baseline bar plus a coloured actual bar per task. Lets stakeholders compare the original plan to current progress.
Milestone-heavy Gantt
Diamond markers dominate over bars. Best for stakeholder briefings where the audience cares about deadlines, not durations.
// 10 — Comparisons
Gantt chart vs other chart types
Gantt charts get confused with several other project visualizations because they all encode work over time. The differences matter — picking the wrong one changes what your reader is allowed to conclude.
Gantt chart vs timeline
Both run along a horizontal time axis, but a Gantt chart is a planning tool with one row per task, durations, and dependencies; a timeline is a storytelling tool that plots a sequence of events as labelled points. Use Gantt for scheduling, timeline for narrative.
Gantt chart
A vertical list of tasks with a horizontal bar per task encoding start, end, and duration. Dependency arrows and milestones are first-class, and the chart is meant to be re-planned as work happens.
- Bars encode duration with width
- Dependency arrows show task ordering
- Best for project planning and tracking
Timeline
A single horizontal axis with labelled events plotted along it. No vertical task list, no dependencies — just a chronology that helps readers see when things happened or will happen.
- Events are points, not bars
- No dependency or resource encoding
- Best for historical or storytelling visuals
Gantt chart vs PERT chart
A Gantt chart visualises the schedule on a calendar axis. A PERT (Program Evaluation and Review Technique) chart visualises the dependency network as a node-link diagram with no calendar. Most teams use both: PERT to design the dependency topology, Gantt to schedule it on a calendar.
Gantt chart
Time on the x-axis, tasks on the y-axis, durations encoded by bar width. Easy to read “what is happening this week” and “how does this slip the end date”.
- Calendar-anchored
- Reads as a schedule
- Good for execution and tracking
PERT chart
Tasks are nodes, dependencies are edges in a directed graph. No calendar axis. Reveals the dependency topology and lets you spot bottlenecks before scheduling.
- Graph-shaped, not calendar-shaped
- Highlights dependency structure
- Good for planning and what-if analysis
Gantt chart vs kanban board
A kanban board is a status visualisation: columns are workflow states and cards move horizontally as work progresses. A Gantt chart is a schedule visualisation: bars are anchored to dates and show how tasks overlap and depend on each other. Most teams use both.
Gantt chart
Date-driven, dependency-aware. Answers “when will this be done?” and “what depends on what?” Less useful for daily flow.
- Time on the x-axis
- Shows dependencies and durations
- Best for planning horizons of weeks–months
Kanban board
State-driven, no calendar. Answers “what is in progress right now?” and “where is work piling up?” Less useful for long-range commitments.
- Workflow state on the x-axis
- Cards have no fixed duration
- Best for daily operational flow
Gantt chart vs burndown chart
A burndown chart shows how much work remains in a sprint or release as a single descending line. A Gantt chart shows the full schedule of every task. Burndowns are concise summaries; Gantts are the underlying plan.
Gantt chart
One bar per task, dates on the x-axis, dependencies and milestones overlaid. Communicates the full plan and where it sits in time.
- Per-task detail
- Dependencies and resources
- Good for stakeholder briefings
Burndown chart
A single line tracking remaining work over time, often with an ideal slope. Communicates whether the team will finish on schedule but not why.
- One line, not many bars
- No dependency or resource detail
- Good for sprint dashboards
// 11 — Common mistakes
Mistakes to watch out for
Almost every broken Gantt chart in the wild fails the same handful of ways. If you only memorise six rules, make them these.
Hand-placing bars instead of scheduling from dependencies
Drag-and-drop scheduling feels productive, but it disconnects the bars from the dependency network. The moment any task moves you lose the rollup logic and the chart stops being a plan — it becomes an annotated picture of someone’s wishes. Always drive the schedule from a dependency-aware tool so a single date change ripples through the rest of the work.
Stale progress fills and an out-of-date today line
A Gantt chart that hasn’t been updated in six weeks is worse than no chart — readers trust it, even though it’s fiction. Re-baseline weekly: mark percent complete on each bar, slide unfinished tasks forward, and recalculate the critical path. Stamp the snapshot date into the title so anyone can see how fresh the plan is.
Too many tasks and no work-breakdown structure
A 200-bar Gantt chart is a wall of stripes that nobody reads. Group sub-tasks under summary bars at the phase level so readers can collapse to phases for a status meeting and expand to leaves only when they own the work. The chart should be readable at three different zoom levels.
Missing dependency arrows
Without arrows a Gantt chart is just a list of bars on a calendar — you lose the entire reason to use the format. Dependencies are what reveal the critical path and what let the schedule recalculate when something slips. Even if the arrows clutter the visual, the underlying tool needs them so the rollup math is right.
Sub-day precision in a multi-month plan
Showing tasks down to the hour when the team plans in weeks creates false precision — stakeholders will treat the chart as more reliable than it actually is and then be surprised when it slips. Match the time granularity of the bars to the granularity of the actual decisions and re-planning cadence.
Colour-only resource encoding
Colouring bars by team or status looks great on the project manager’s laptop but vanishes when the chart is printed in monochrome or read by someone with a colour-vision deficiency. Reinforce every colour with a pattern, an icon, or a direct text label so the encoding survives outside its native viewer.
Treating the Gantt as a status report instead of a plan
Some teams publish their Gantt chart once at the start of a project and never look at it again. The chart is a planning tool: its value comes from being re-run as work happens. If you can’t commit to weekly maintenance, switch to a kanban board or a milestone chart that doesn’t pretend to predict the future.
// 12 — Accessibility
Accessibility checklist
Run through this list before publishing. The chart should still communicate its message to readers using assistive technology, color-blind users, keyboard navigation, and reduced-motion settings.
- ✓
Provide a text alternative listing every task
WCAG 1.1.1Add an accessible name (alt text or aria-label) for the chart that summarises the schedule, then publish a fully accessible data table next to the chart with columns for task name, start, end, duration, dependencies, and percent complete. Many readers will navigate the table rather than the visual. - ✓
Do not rely on colour alone to encode resources or status
WCAG 1.4.1If colour encodes the responsible team, status, or critical-path membership, reinforce it with a pattern, a direct text label, or an icon. Roughly 1 in 12 men and 1 in 200 women have a colour-vision deficiency and many monochrome printers strip colour entirely. - ✓
Meet WCAG colour-contrast minimums
WCAG 1.4.3Bar fills against the chart background should reach at least 3:1 contrast for graphical objects. Date labels, task names, and tooltip text should reach 4.5:1 for body text or 3:1 for large text. Dependency arrows often fail this on light grey — darken the stroke or add a halo. - ✓
Expose the schedule as a structured data table
WCAG 1.3.1Place the underlying schedule in a real <table> with proper headers, or expose it via a hidden table that screen readers can navigate. Group rows by phase using rowgroup semantics so readers can skim the plan at the same hierarchy as the visual. - ✓
Make every task bar focusable and labelled
WCAG 2.1.1If the chart is interactive, each bar should be reachable with the Tab key in task order. The aria-label for each bar should read like a sentence — “Design review, March 12 to March 19, 5 working days, depends on Wireframes, 60% complete” — not just the task name. - ✓
Make dependency arrows distinguishable
WCAG 1.4.11Dependency arrows often blend into gridlines. Use a distinct stroke colour with at least 3:1 contrast against the background, a thicker weight than the gridlines, and arrowheads that survive at the rendered size. For complex networks, add a hover or focus highlight that traces the full path. - ✓
Respect prefers-reduced-motion
WCAG 2.3.3If bars or arrows animate when the chart loads, gate the animation behind a prefers-reduced-motion: no-preference media query so motion-sensitive readers see the final state immediately instead of a moving forest of bars. - ✓
Use a responsive viewBox and keep labels legible at zoom
WCAG 1.4.4Long projects produce wide charts. Use a responsive SVG viewBox so the chart scales with the viewport, and verify that task names and date labels remain readable at 200% browser zoom. Allow horizontal scrolling rather than truncating bars. - ✓
Caption the date axis with units and time zone
WCAG 3.3.2“Week 14” is fine in display, but the axis title or caption must specify the unit (“ISO weeks, 2026”) and the time zone for sub-day schedules. Readers who can’t see the chart should still understand what the dates mean.
// 13 — Best practices
Design and craft tips
The mistakes section above tells you what to avoid. The list below is the positive version: the small set of habits that separate a good Gantt chart from a passable one.
Highlight the critical path
Hand-place bars on the calendar
Group sub-tasks into summary bars
Show every task at maximum granularity
Mark progress and re-baseline weekly
Promise sub-day precision in a multi-month plan
Add milestones for external commitments
Use a Gantt chart for ongoing operational work
// 15 — Tool instructions
How to build it in your tool of choice
Most spreadsheet tools have no native Gantt mark, so you build one with a stacked-bar hack. Dedicated BI and project tools ship a real Gantt object with dependency support. Below are the recipes for each.
Microsoft Excel
Spreadsheet — ~6 min- 01Lay out four columns: Task, Start date, Duration (in days), and an Offset helper that equals Start − the project start date.
- 02Select the Task, Offset, and Duration columns and choose Insert → Charts → 2-D Bar → Stacked Bar.
- 03Right-click the first (Offset) series, choose Format Data Series, and set Fill to No Fill so only the duration bars remain visible.
- 04Right-click the category axis and tick Categories in reverse order so the first task sits at the top instead of the bottom.
- 05Right-click the value axis and set Minimum to your project start date (in serial-number form) and the Number format to a date format like d-mmm.
- 06Add a chart title with the project end date, then add data labels showing percent complete on the duration series for an at-a-glance progress view.
Tip: Excel has no native Gantt mark, so dependency arrows and milestones must be drawn manually with shapes — budget time for that or move to a tool with a real Gantt object.
Google Sheets
Spreadsheet — ~6 min- 01Build the same Task / Start / Duration / Offset table you would in Excel, with Offset = Start − project start.
- 02Select the range and choose Insert → Chart, then in the Chart editor set the Chart type to Stacked bar chart.
- 03In the Setup tab confirm Task is on the X-axis and Offset and Duration are the two series.
- 04Switch to Customize → Series, click the Offset series, and set Fill opacity to 0% (or set Color to white) so it disappears.
- 05Open Customize → Horizontal axis, set Min bound to your project start date, and Format → Date so ticks read as days or weeks.
- 06Use the Add-ons menu to install “Awesome Table” or “ProjectSheet” if you need automatic dependency arrows — vanilla Sheets won’t draw them.
If you need true critical-path scheduling, jump from Sheets to Smartsheet, Asana, or a dedicated Gantt tool — the spreadsheet hack tops out at static visuals.
Python (Plotly Express)
Code — ~5 min- 01Install dependencies with pip install plotly pandas; matplotlib alone has no Gantt mark.
- 02Build a pandas DataFrame with columns Task, Start, Finish, and Resource. Parse Start and Finish with pd.to_datetime so Plotly treats them as time.
- 03Call px.timeline(df, x_start='Start', x_end='Finish', y='Task', color='Resource') to render the bars.
- 04Reverse the task axis with fig.update_yaxes(autorange='reversed') so the first task sits at the top.
- 05Add a vertical line for today with fig.add_vline(x=pd.Timestamp.today(), line_dash='dash') to mark progress.
- 06Set the title with fig.update_layout(title='Website redesign — plan as of <date>') and call fig.show() or fig.write_html().
If you need a static publication-ready Gantt, use matplotlib’s ax.barh() with date axes and a custom dependency-arrow drawing pass — expect to write more code.
R (ggplot2)
Code — ~5 min- 01Install ggplot2 with install.packages('ggplot2') and load it with library(ggplot2).
- 02Build a data frame with columns task, start, end, and resource; parse start and end with as.Date() so ggplot draws a date axis.
- 03Reorder the task factor so the first task is on top: tasks$task <- factor(tasks$task, levels = rev(tasks$task)).
- 04Call ggplot(tasks, aes(x = start, xend = end, y = task, yend = task, colour = resource)) + geom_segment(size = 6) to draw fat task bars.
- 05Add geom_point(aes(x = milestone_date), shape = 23, size = 4) for milestone diamonds and geom_vline(xintercept = Sys.Date(), linetype = 'dashed') for today.
- 06Polish with scale_x_date(date_breaks = '1 week', date_labels = '%d %b'), labs() for the title, and theme_minimal().
Use geom_segment() rather than geom_bar() — segments give you proper start/end coordinates on the date axis without the categorical-bar contortion.
JavaScript (D3.js)
Code — ~12 min- 01Install D3 (npm i d3) or include the CDN tag, plus optionally d3-time-format for date parsing.
- 02Create an SVG container, choose a margin object, and define width/height for the plot area.
- 03Build a d3.scaleTime() for the x-axis (domain = project start to end) and a d3.scaleBand() for the y-axis with one band per task.
- 04Bind the data with selectAll('rect').data(tasks).join('rect') and set x = scaleX(d.start), y = scaleY(d.task), width = scaleX(d.end) - scaleX(d.start), height = scaleY.bandwidth().
- 05Render axes with d3.axisBottom(scaleX).tickFormat(d3.timeFormat('%d %b')) and d3.axisLeft(scaleY).
- 06Layer dependency arrows with svg.append('path').attr('d', …) using the line generator, and add focusable rects with role='img' and aria-label attributes for accessibility.
If you don’t need full control, frappe-gantt and dhtmlx-gantt give you a working interactive Gantt in a handful of lines and ship dependency drag-and-drop out of the box.
Tableau
BI — ~5 min- 01Drag the Task dimension to the Rows shelf and the Start date to the Columns shelf, set to continuous Day-level granularity.
- 02Change the Marks card from Automatic to Gantt Bar — Tableau has a native Gantt mark.
- 03Create a calculated field for Duration ( DATEDIFF('day', [Start], [End]) ) and drag it onto the Size property of the Marks card.
- 04Drag Resource onto Color and Status onto Pattern (via dual axis if needed) so the encoding survives without colour.
- 05Drop Percent Complete onto the Label property so each bar prints its progress, and add a constant reference line for today's date.
- 06Use Format → Lines to clean up gridlines and edit the worksheet title to include the snapshot date.
Tableau’s Gantt Bar mark is the cleanest in the BI category, but dependency arrows still require a parameter-driven dual-axis hack — budget extra time for that.
Power BI
BI — ~5 min- 01Open the Visualizations pane and choose Get more visuals; install the official Microsoft Gantt by Microsoft (or the community Gantt by MAQ Software) from AppSource.
- 02Drop the Task field into the Task well, Start into the Start Date well, and either End or Duration into the matching well.
- 03Drag Resource into the Legend well so bars are colour-coded and Percent Complete into the % Completion well to draw progress fills.
- 04Open the Format pane, expand Task Settings, and tick Show Dependencies if your dataset includes a Predecessors column.
- 05Under Format → Date Type set the granularity to Week or Day depending on project length, and set the Today line to a noticeable colour.
- 06Edit the visual title with a takeaway sentence (“Website relaunch on track for May 9”), and toggle Data labels for the bar end-date stamps.
If you can’t install custom visuals (locked-down tenant), the Stacked bar chart hack from Excel/Sheets also works in Power BI but loses dependency arrows and the today line.
// 16 — Code examples
Working code in the most common stacks
Three runnable snippets that produce the same Gantt chart — a seven-task website-relaunch plan colour-coded by workstream with a today line marking progress. Copy, paste, and replace the data with yours.
import pandas as pd
import plotly.express as px
tasks = pd.DataFrame([
{"Task": "Discovery", "Start": "2026-01-06", "Finish": "2026-01-23", "Resource": "Research"},
{"Task": "Wireframes", "Start": "2026-01-19", "Finish": "2026-02-06", "Resource": "Design"},
{"Task": "Visual design","Start": "2026-02-02", "Finish": "2026-03-06", "Resource": "Design"},
{"Task": "Build", "Start": "2026-02-23", "Finish": "2026-04-10", "Resource": "Engineering"},
{"Task": "Content", "Start": "2026-02-09", "Finish": "2026-03-27", "Resource": "Content"},
{"Task": "QA", "Start": "2026-03-30", "Finish": "2026-04-24", "Resource": "Engineering"},
{"Task": "Launch prep", "Start": "2026-04-20", "Finish": "2026-05-08", "Resource": "PM"},
])
# Parse dates so Plotly can draw a true time axis.
tasks["Start"] = pd.to_datetime(tasks["Start"])
tasks["Finish"] = pd.to_datetime(tasks["Finish"])
fig = px.timeline(
tasks,
x_start="Start",
x_end="Finish",
y="Task",
color="Resource",
title="Website relaunch — Q1–Q2 2026",
color_discrete_sequence=["#c94a2e", "#e8c4b8", "#6b6b67", "#2e7d52"],
)
# Tasks read top-down and “today” is marked for at-a-glance progress.
fig.update_yaxes(autorange="reversed")
fig.add_vline(x=pd.Timestamp("2026-03-15"), line_dash="dash", line_color="#1a1a18")
fig.update_layout(
xaxis_title="",
yaxis_title="",
legend_title_text="Workstream",
plot_bgcolor="white",
)
fig.write_html("gantt_chart.html")
fig.show()
// 17 — FAQs
Frequently asked questions
What is a Gantt chart?+
A Gantt chart is a horizontal bar chart plotted against a time axis. Each bar represents a task or activity in a project: its left edge marks the start date, its right edge marks the end date, and its width encodes the duration. Tasks are listed vertically on the left, with optional dependency arrows, milestones, and progress fills layered on top.
When should you use a Gantt chart?+
Use a Gantt chart when planning, scheduling, or tracking a project that has clearly defined tasks with start and end dates. They shine when dependencies and the critical path matter, when you need a single artefact to align stakeholders on timeline, and when you want to compare planned vs actual progress over weeks or months.
When should you avoid a Gantt chart?+
Avoid Gantt charts for portfolios with hundreds of tasks (the bars become an unreadable wall), for ongoing operational work without clear end dates, for highly iterative agile teams whose backlog reshuffles every sprint, and when audiences only need a one-page status summary — a milestone or burndown chart will communicate faster.
What data do you need to make a Gantt chart?+
At minimum each row needs a task name, a start date, and either an end date or a duration. Rich Gantt charts also include a dependency list (predecessor task IDs and lag), a percent-complete field, an assignee or resource, and an optional task category or work-breakdown level for grouping.
How is a Gantt chart different from a timeline?+
A timeline shows a sequence of events plotted along a single horizontal axis — usually as labeled points or short bars without dependencies. A Gantt chart adds a vertical task list, encodes duration with bar width, and draws dependency arrows between tasks. Use a timeline for storytelling, a Gantt chart for planning.
How is a Gantt chart different from a PERT chart?+
A Gantt chart visualises time on a calendar axis: each bar is a task, length encodes duration, position encodes when. A PERT chart visualises the dependency network as a node-link diagram: each node is a task, each edge a dependency, with no calendar axis. Use Gantt for the schedule, PERT for the topology.
How is a Gantt chart different from a kanban board?+
A kanban board is a status board: columns represent workflow states (Backlog / In Progress / Done), and cards move horizontally as work progresses. A Gantt chart is a schedule: bars are anchored to dates and show how tasks overlap and depend on each other. Most teams use both — kanban for daily flow, Gantt for the longer plan.
What are dependencies and the critical path?+
A dependency is a relationship between two tasks where one must start (or finish) before the other can begin. The critical path is the longest chain of dependent tasks: any slip on the critical path slips the whole project end date. Most Gantt tools highlight the critical path in red so project managers know which tasks to protect.
What is a milestone in a Gantt chart?+
A milestone is a zero-duration event drawn as a diamond marker rather than a bar. It marks a key deadline, deliverable, or review point — “design sign-off”, “beta launch”, “regulatory approval”. Milestones anchor the timeline and give stakeholders fixed checkpoints to coordinate around.
How many tasks can a Gantt chart hold?+
Comfortably 10–50 tasks. Below 10 a Gantt chart is overkill — a simple timeline works. Above 100 tasks the chart becomes a wall of bars that nobody reads. Group sub-tasks into summary bars (the work-breakdown structure) and let readers expand the level of detail they need.
What category of chart is a Gantt chart?+
Gantt charts belong to the Time Series and Project Management family. They share DNA with timelines, milestone charts, and waterfall plots, but their dependency arrows and resource encoding are unique to project scheduling.
What is the best library or tool for building Gantt charts?+
For interactive web Gantts, Plotly Express’s timeline() function and the d3-gantt and frappe-gantt JavaScript libraries are the popular open-source choices. For static, publication-quality output use ggplot2’s geom_segment() in R. For project workflows, Microsoft Project, Smartsheet, Asana, Monday.com, and Jira’s timeline view all ship Gantt views.
Are Gantt charts accessible to screen readers?+
Yes, with effort. Pair the chart with a data table listing task name, start, end, duration, dependencies, and percent complete. Give each bar an ARIA label that includes the same information, ensure tab order matches task order, draw dependency arrows with sufficient contrast, and never rely on colour alone to encode resource or status.
How do you build a Gantt chart in Excel?+
Excel has no native Gantt mark, but you can fake one with a stacked horizontal bar chart: column A holds task names, column B holds the offset from the project start, column C holds the duration. Plot a stacked bar, set the offset series fill to “No Fill” so it becomes invisible, reverse the category axis, and you have a Gantt chart.
How do you read a Gantt chart?+
Start at the top-left task and read down. The horizontal axis is calendar time, so a bar that starts further right starts later. Compare bar widths to see relative duration. Follow dependency arrows to understand the critical path. Diamond markers are milestones; striped or filled-in bar segments show progress; colours usually encode resource, phase, or status.
// 18 — References
References and further reading
Primary sources, reference texts, and the official documentation for the libraries and tools referenced throughout this guide.
- Wikipedia — Gantt chartReferenceEncyclopedia entry covering the history (Adamiecki’s harmonogram, Gantt’s WWI work), variants, and visual encoding of Gantt charts. A neutral starting point with citations.https://en.wikipedia.org/wiki/Gantt_chart
- Karol Adamiecki — The harmonogram (1896)Primary sourceThe Polish engineer who invented the harmonogram — a horizontal bar schedule — a decade and a half before Gantt. Adamiecki published in Russian and Polish, which is why Gantt got the eponym.https://en.wikipedia.org/wiki/Karol_Adamiecki
- Henry L. Gantt — Work, Wages, and Profits (1910)Primary sourceGantt’s own writing on industrial scheduling. The bar charts that bear his name appeared in his consulting work for the U.S. Army Ordnance Department during World War I.https://archive.org/details/workwagesprofitst00gantuoft
- The Project Management Body of Knowledge defines work-breakdown structures, dependency types, and critical-path method — the conceptual scaffolding that every Gantt chart builds on.https://www.pmi.org/pmbok-guide-standards
- Tufte’s foundational text on data graphics. The chapters on small multiples and chartjunk explain why a clean Gantt beats a 3-D project waterfall every time.https://www.edwardtufte.com/book/the-visual-display-of-quantitative-information/
- Financial Times — Visual VocabularyReferenceOpen-source poster categorising chart types by intent. Gantt charts and timelines sit firmly in the Time and Sequence families.https://github.com/Financial-Times/chart-doctor/tree/main/visual-vocabulary
- Practitioner-oriented guide covering critical path, baselining, and how to roll a Gantt up to a portfolio view. Useful counterpoint to the academic primary sources.https://www.projectmanager.com/guides/gantt-chart
- WAI — Complex Images: Charts and GraphsAccessibilityWeb Accessibility Initiative guidance on making charts accessible: text alternatives, long descriptions, and data tables. Use this when building the Gantt accessibility checklist.https://www.w3.org/WAI/tutorials/images/complex/
- Official Plotly documentation for the timeline()/Gantt helper used in this guide’s Python sample, including dependency arrows and resource colour-coding.https://plotly.com/python/gantt/
- Tidyverse documentation for the line-segment geometry used in this guide’s R sample. Explains how to map start/end coordinates on a date axis.https://ggplot2.tidyverse.org/reference/geom_segment.html
- Lightweight JavaScript library that renders an interactive Gantt with dependency drag-and-drop. A reasonable starting point if you don’t want to roll your own D3 implementation.https://frappe.io/gantt
- Maintained Observable notebooks demonstrating D3-based Gantt charts with date axes, dependency arrows, and tooltips. Mirrors the JavaScript code sample in this guide.https://observablehq.com/@d3/gantt-chart