Skip to documentation content

Documentation · Process

PERT chart

Write every task with an id, a name and how long it takes, then what it waits for. The earliest and latest times, the slack and the critical path are worked out for you.

When to use it

Schedule a project from its tasks, their durations and what each waits for, and find the critical path: the chain of tasks with no slack that sets how long the project takes. A PERT chart and a critical path diagram in one.

Give each task an id and write what it waits for with after. Use three estimates (optimistic, most likely, pessimistic) where a duration is uncertain, and shorten the critical path first to finish sooner.

Working example

Copy this complete example into the Source tab, then press Generate. Change its labels or values to make your first version.

Tingraph source
pert "Website launch" {
  unit "days"
  task A "Requirements" 5
  task B "Design" 8 after A
  task C "Content" 6 after A
  task D "Backend" 12 after B
  task E "Frontend" 10 after B
  task F "Testing" 4 after C D E
  task G "Launch" 1 after F
}

Syntax reference

The same reference used by the editor and AI briefing. Syntax is notation-specific; use the keywords listed here.

Figure

SyntaxMeaning
pert "Title" {open a PERT chart, activity-on-node

Tasks

SyntaxMeaning
task A "Requirements" 5a task: its id, its name and how long it takes
task B "Design" 8 after Aa task that starts once A has finished
task F "Testing" 4 after C D Ea task that waits for several
task D "Backend" 8 12 22three estimates: optimistic, most likely, pessimistic
task M "Sign-off" 0 after Fa milestone takes no time

Look

SyntaxMeaning
unit "days"what a duration is counted in
critical redbold (heavier ink) or red, for the critical path
legend offleave out the key and the project's length
ends offleave out the Start and Finish nodes
text 13caption size, 9 to 22
size 1000 460width and height on the sheet
# commentline comment (also //)

Language rules

  • The file is one pert "Title" { ... } block. Nothing may sit outside it.
  • A task is task ID "Name" 5: a one-word id, its name in quotes and how long it takes, 0 or more. A task of 0 is a milestone. Give every task its own id, and do not use a setting's name as an id.
  • For an uncertain duration write three numbers instead of one — optimistic, most likely, pessimistic, each at least the one before: task D "Backend" 8 12 22. PERT expects (o + 4m + p) / 6.
  • after and the ids of the tasks it waits for follow the duration: task F "Testing" 4 after C D E. Every id after after must be a task, and no task may wait for itself, directly or round a loop.
  • Do not write start or finish times, slack or the critical path: they are worked out from the durations and drawn in each node's corners (ES, duration, EF along the top; LS, slack, LF along the bottom).
  • Settings are written as name value, in any order.
  • Do not invent settings. Every one the language has is listed above.

Edit on the canvas

  • Pick a task on the sheet to rename it, add a task that waits for it, or take it out; what waited for it then waits for what it waited for.
  • Set durations, three-point estimates and dependencies in the PERT panel; the earliest and latest times, slack and the critical path are worked out.

Generate replaces the drawing from source. Save before generating again if you want to preserve manual finishing touches.

Read Saving & exporting

Write it with an assistant

Tingraph AI already knows this notation. For another assistant, copy the tutorial below, describe your diagram under MY DIAGRAM, then paste the returned source into the editor. This prompt includes every syntax row, rule and working example above.

Read the complete prompt
You are writing Tingraph source. Tingraph is a small text language that draws a PERT chart with its critical path. Answer with Tingraph source only.

SYNTAX
Figure
  pert "Title" {              open a PERT chart, activity-on-node

Tasks
  task A "Requirements" 5     a task: its id, its name and how long it takes
  task B "Design" 8 after A   a task that starts once A has finished
  task F "Testing" 4 after C D E  a task that waits for several
  task D "Backend" 8 12 22    three estimates: optimistic, most likely, pessimistic
  task M "Sign-off" 0 after F  a milestone takes no time

Look
  unit "days"                 what a duration is counted in
  critical red                bold (heavier ink) or red, for the critical path
  legend off                  leave out the key and the project's length
  ends off                    leave out the Start and Finish nodes
  text 13                     caption size, 9 to 22
  size 1000 460               width and height on the sheet
  # comment                   line comment (also //)

RULES
- The file is one `pert "Title" { ... }` block. Nothing may sit outside it.
- A task is `task ID "Name" 5`: a one-word id, its name in quotes and how long it takes, 0 or more. A task of 0 is a milestone. Give every task its own id, and do not use a setting's name as an id.
- For an uncertain duration write three numbers instead of one — optimistic, most likely, pessimistic, each at least the one before: `task D "Backend" 8 12 22`. PERT expects (o + 4m + p) / 6.
- `after` and the ids of the tasks it waits for follow the duration: `task F "Testing" 4 after C D E`. Every id after `after` must be a task, and no task may wait for itself, directly or round a loop.
- Do not write start or finish times, slack or the critical path: they are worked out from the durations and drawn in each node's corners (ES, duration, EF along the top; LS, slack, LF along the bottom).
- Settings are written as `name value`, in any order.
- Do not invent settings. Every one the language has is listed above.

WORKED EXAMPLE
pert "Website launch" {
  unit "days"
  task A "Requirements" 5
  task B "Design" 8 after A
  task C "Content" 6 after A
  task D "Backend" 12 after B
  task E "Frontend" 10 after B
  task F "Testing" 4 after C D E
  task G "Launch" 1 after F
}

OUTPUT
- Reply with one fenced code block and nothing else.
- The block starts with `pert "…" {` and ends with `}`.
- Do not invent keywords: use only the ones listed above.
- Keep labels short enough to read inside a box, and keep every ID unique.

MY DIAGRAM
Describe what you want here, then send this message.
How AI requests, attachments and privacy work

Something unclear? Contact support or read the Privacy Policy.