Schematex

Timeline diagram

About timelines

A timeline diagram arranges events along a shared time axis so that chronological relationships are immediately visible. Project managers use them to show sprint schedules and milestones; historians use them to place discoveries in context; journalists use them to reconstruct event sequences; clinical researchers use them to map treatment courses. The visual form has no single governing standard, but the conventions are universal: time runs left to right, events are marked at their dates, and spans show duration.

Schematex renders timelines in three visual styles — swimlane (events spread above and below an axis), gantt (horizontal duration bars, useful for project scheduling), and lollipop (dot-on-stick markers, useful for historical retrospectives). All three share the same DSL; the style config key switches between them.

timeline·§
↘ preview
100%
Timeline — History of the Web Schematex timeline diagram History of the Web World Wide Web — Berners-…1991 Mosaic browser1993 JavaScript — Brendan Eich1995 Google founded1998 Facebook launches2004 iPhone — mobile web era2007 Node.js — server-side Jav…2009 ES6 / React mainstream2015 ChatGPT — AI era begins2022 1995 2000 2005 2010 2015 2020
UTF-8 · LF · 12 lines · 550 chars✓ parsed·5.5 ms·10.5 KB SVG

1. Your first timeline

The smallest useful timeline: a title, two ordinary events, and a milestone.

timeline·§
↘ preview
100%
Timeline — Product Launch Schematex timeline diagram Product Launch Development complete Closed beta Public launch 2024 2025 2025 2025 2025
UTF-8 · LF · 4 lines · 124 chars✓ parsed·2.0 ms·5.8 KB SVG

Four rules cover 80% of usage:

  1. Start with the keyword timeline, optionally followed by a quoted title.
  2. Each event is DATE: "Label" — a date, a colon, then a quoted label. A milestone keyword before the label marks the event as a milestone.
  3. Date ranges use DATE - DATE: or DATE .. DATE: (both are equivalent).
  4. Add [key: value] properties after the quoted label to set color, side placement, shape, or category.

Comments must start with # or // on their own line.


2. Events

An event line places a labeled marker at a point in time (or a bar across a span).

2.1 Point events

2024-09-15: "Conference keynote"

2.2 Range events

2024-06-01 - 2024-08-31: "Q3 development sprint"
2024-06-01 .. 2024-08-31: "Q3 development sprint"

Both separators (- surrounded by spaces, or ..) are equivalent.

2.3 Milestones

2024-09-01: milestone "Public launch"

The milestone keyword before the quoted label switches the marker to a diamond shape.

2.4 Event properties

Properties go in [key: value, …] after the quoted label, before the newline.

PropertyValuesMeaning
color:hex stringCustom color for this marker or bar
side:above | belowForce placement above or below the axis (swimlane / lollipop)
icon:any text (e.g. emoji)Icon displayed with the event
shape:circle | square | diamond | star | flagPoint marker shape
category:quoted stringGroup label — drives color in gantt legend
2024-09-01: milestone "Launch day" [color: #E53935, side: above]
2024-07-15: "Beta ships" [icon: 🚀, category: "product"]
timeline·§
↘ preview
100%
Timeline — Engineering Milestones Schematex timeline diagram Engineering Milestones Sprint planning complete2024-01-08 Design system shipped2024-02-14 ⚠️ Incident — 4h outage2024-03-22 API v2 GA2024-07-01 2024 2024 2024 2024 2024 2024 2024 2024 2024 2024
UTF-8 · LF · 8 lines · 324 chars✓ parsed·0.9 ms·8.4 KB SVG

3. Date formats

All date formats can appear anywhere a date is expected — in events, eras, and ranges.

FormatExampleNotes
Full date2024-09-15Day-precision; YYYY-MM-DD
Year-month2024-09Month-precision
Year2024Year-precision
Quarter2024-Q3Maps to start of that quarter
BC year (negative)-753753 BC
BC year (suffix)753BC or 753BCESame as -753
Geological65Ma, 4.6Ga, 12kaMillion / billion / thousand years ago
timeline·§
↘ preview
100%
Timeline — Age of Earth Schematex timeline diagram Age of Earth Earth forms4600Ma Cambrian explosion540Ma Permian extinction — 96% …252Ma K-Pg extinction — end of …66Ma Earliest stone tools (Lom…3Ma Present day0 1 yr 10 yr 100 yr 1 ka 10 ka 100 ka 1 Ma 10 Ma 100 Ma 1000 Ma
UTF-8 · LF · 10 lines · 297 chars✓ parsed·0.7 ms·9.4 KB SVG

4. Eras (background spans)

An era line draws a shaded background band across the time axis. It always requires a date range.

era 2020 - 2022: "Foundation Phase"
era 2022 .. 2025: "Growth Phase" [color: #E8F5E9]

The [color: …] property is optional. Overlapping eras stack into separate bands automatically.

timeline·§
↘ preview
100%
Timeline — Company History Schematex timeline diagram Company History Early Stage Series A & B Founded First paying customer Product-market fit Series A — $8M Series B — $30M Profitability 2019 2020 2020 2021 2021 2022 2022 2023 2023 2024 2024
UTF-8 · LF · 12 lines · 377 chars✓ parsed·1.2 ms·8.2 KB SVG

5. Tracks (swimlane grouping)

A track block groups related events into a named swimlane. Indented event lines (2 spaces) belong to the track.

track "Engineering":
  2024-01-15 - 2024-03-31: "API design"
  2024-04-01 - 2024-07-31: "Implementation"

track "Marketing":
  2024-06-01: "Campaign kick-off"
  2024-09-01: milestone "Launch campaign" [color: #1B5E20]

Tracks are most useful in gantt style, where each track becomes its own labeled row.

timeline·§
↘ preview
100%
Timeline — Q3 Project Plan Schematex timeline diagram Q3 Project Plan Tasks Database migration New design system Staging environment API hardening Integration & QAGo-live Teams Tasks 2025 2025 2025 2025 2025 2025
UTF-8 · LF · 14 lines · 374 chars✓ parsed·1.8 ms·7.3 KB SVG

6. Notes

A note: line indented under an event attaches a tooltip annotation to it.

2024-06-01: "Beta launch"
  note: "First external users; NPS target 40+"

Notes work both for flat events and for events inside tracks.


7. Configuration

config: lines tune the layout and visual style. Each is its own line in the form config: key = value.

KeyValuesDefaultEffect
styleswimlane | gantt | lollipopswimlaneVisual rendering mode
orientationhorizontal | verticalhorizontalAxis direction
scaleproportional | equidistant | logproportionalHow time maps to screen space
axisbottom | centerbottomWhere the time axis is drawn

Style notes:

  • swimlane — events alternate above and below a horizontal axis; side: controls per-event placement. Eras add colored background bands. Best for roadmaps and biographies.
  • gantt — each named track becomes a horizontal bar lane; milestones become pins above the bars. gantt-project is an alias. Best for project scheduling.
  • lollipop — a center axis with labeled cards on alternating stems. Best for historical retrospectives with sparse, memorable events.

Swimlane — roadmaps, product timelines, biographies. Eras add color bands; events alternate above and below.

timeline·§
↘ preview
100%
Timeline — SaaS Platform Roadmap Schematex timeline diagram SaaS Platform Roadmap Foundation Growth API v2 build Performance & scaling Kick-off & team onboarding Architecture sign-off Security audit Beta launch General availability 2024 2024 2024 2024 2024 2024 2025 2025 2025
UTF-8 · LF · 13 lines · 507 chars✓ parsed·1.0 ms·8.3 KB SVG

Gantt — parallel tracks with horizontal duration bars and milestone pins. Best for project scheduling.

timeline·§
↘ preview
100%
Timeline — Product Launch — Q4 Schematex timeline diagram Product Launch — Q4 Tasks Feature freeze & hardening Final UI polish Campaign prep Asset delivery Launch campaign Load testingLaunch day Teams Tasks 2025 2025 2025 2025 2025 2025 2025 2025 2025
UTF-8 · LF · 15 lines · 426 chars✓ parsed·0.6 ms·8.1 KB SVG

Lollipop — sparse milestones on a centered axis with alternating cards. Best for historical retrospectives and brand stories.

timeline·§
↘ preview
100%
Timeline — History of Computing Schematex timeline diagram History of Computing Turing — On Computable Nu…1936 ENIAC — first general-pur…1945 ARPANET1969 Intel 4004 microprocessor1971 Apple I1976 World Wide Web (Berners-L…1991 iPhone2007 1940 1950 1960 1970 1980 1990 2000
UTF-8 · LF · 11 lines · 353 chars✓ parsed·0.7 ms·9.1 KB SVG

8. Labels & comments

  • Title: timeline "My Title" — first line only.
  • Event label: quoted string after the colon: DATE: "Label".
  • Milestone label: DATE: milestone "Label".
  • Era label: era DATE - DATE: "Label".
  • Track name: track "Name":.
  • Note: note: "text" indented under an event.
  • Comments: # or // at the start of a line (after leading whitespace).

9. Reserved words & escaping

Reserved at line start: timeline (header), config:, era, track, note:.

Date range separators: - (space-hyphen-space) and .. — avoid these sequences inside label text that appears before the colon.

BC years as negative integers: -753 is the year 753 BC. The parser distinguishes the negative sign from a range separator by checking for surrounding whitespace — - (with spaces) is a range; -753 (no leading space after a colon) is a BC year.

Property blocks: [key: value] must appear after the quoted label on the same line. The closing ] must be present; unclosed brackets produce a parse error.


10. Common mistakes

You wroteParser saysFix
2024-06-01: Launch day (unquoted label)Line not recognized as an event — TimelineParseErrorQuote the label: 2024-06-01: "Launch day"
2024-06 - 2024-09: "Q3" (year-month range)Parsed correctlyThis works — all date formats are valid in ranges
era 2024: "Whole year" (no range)TimelineParseError: era requires a date rangeUse a range: era 2024 - 2024: "Whole year"
track "Backend" (no colon)TimelineParseError: Expected ':' after track nameAdd the colon: track "Backend":
2024-01-01: "Event" [side: left]side: left silently ignored; only above and below are validUse side: above or side: below
config: style = Gantt (capital G)TimelineParseError: Invalid style: GanttUse lowercase: config: style = gantt
2024-01-01-2024-03-31: "Q1" (no spaces around -)Parser reads 2024-01-01-2024 as a date — failsUse spaces: 2024-01-01 - 2024-03-31: or ..: 2024-01-01..2024-03-31:
Indented event without a trackIndented lines under the timeline header that aren't inside a track block — parsed as flat eventsOnly indent events that are inside a track "Name": block

11. Grammar (EBNF)

document     = header ( blank | comment | config | era | track | event )*

header       = "timeline" ( WS quoted-string )? NEWLINE
quoted-string = '"' any-char-but-quote* '"'

config       = "config:" WS key WS "=" WS value NEWLINE
key          = "style" | "orientation" | "scale" | "axis"

era          = "era" WS date-range ":" WS quoted-string ( WS props )? NEWLINE
track        = "track" WS quoted-string ":" NEWLINE
                 ( INDENT≥2 event | INDENT≥2 note )*

event        = date-spec ":" WS event-body ( WS props )? NEWLINE
               ( INDENT note )?
event-body   = ( "milestone" WS )? quoted-string
date-spec    = date ( ( " - " | ".." ) date )?

note         = "note:" WS quoted-string NEWLINE

props        = "[" prop-list "]"
prop-list    = prop ( "," prop )*
prop         = key ":" WS value
             | key ":" WS quoted-string

date         = iso-date | year-month | year | quarter | bc-year | geological
iso-date     = digit{4} "-" digit{2} "-" digit{2}
year-month   = digit{4} "-" digit{2}
year         = "-"? digit{1,5}
quarter      = digit{4} "-"? "Q" [1-4]
bc-year      = digit+ ( "BC" | "BCE" )
geological   = number ( "Ma" | "Ga" | "ka" )

comment      = ( "#" | "//" ) any NEWLINE

Authoritative source: src/diagrams/timeline/parser.ts. If this diverges from the parser, the parser wins — please open an issue.


12. Standard compliance

Timeline diagrams have no single governing standard. Schematex follows established visualization conventions:

  • Swimlane style — adapted from the horizontal timeline convention used in academic historiography and project management (PMI PMBOK).
  • Gantt style — follows the Gantt chart form introduced by Henry Gantt (1910–1915); bar-per-track layout matches the ISO 21500 project scheduling convention.
  • Lollipop style — follows the dot plot / stem plot convention common in data journalism and infographics.

What is implemented today:

  • ✅ Three visual styles: swimlane, gantt, lollipop
  • ✅ Horizontal and vertical orientation
  • ✅ Three scale modes: proportional, equidistant, log
  • ✅ Point events, range events (bars), and milestone markers
  • ✅ Eras (background shading bands)
  • ✅ Named tracks (swimlane rows)
  • ✅ Event notes
  • ✅ Six date formats: full date, year-month, year, quarter, BC year, geological (Ma/Ga/ka)
  • ✅ Event properties: color, side, icon, shape, category
  • ⏳ Vertical orientation rendering (parsed, layout not yet implemented)
  • log scale rendering (parsed, layout treats as proportional today)
  • ⏳ Axis tick labels with custom format strings
  • ⏳ Event connectors (arrows between related events)

References:

  • Gantt, H.L. (1910). Work, Wages, and Profits. Engineering Magazine.
  • Tufte, E.R. (1983). The Visual Display of Quantitative Information. — Timeline as small multiples.

13. Roadmap

Planned — not yet parseable. Do not use these in generated DSL today; the parser will reject or ignore them.

  • Event connectorsconnect ev1 -> ev2 [label: "causes"] arrows linking two events across time.
  • Repeat / recurrenceevery 2024-Q1 .. 2024-Q4 monthly: "Sprint review" for regular events.
  • Axis tick formatconfig: tickFormat = "%b %Y" for custom date display on the axis.
  • Vertical orientationconfig: orientation = vertical with events left/right of a vertical axis (parsed; rendering deferred).
  • Log scaleconfig: scale = log for geological or deep-history spans that need compressed recent years (parsed; layout deferred).

Track in the GitHub issues if you need any of these sooner.