Generate SVG timelines from CSV
Find a file
tegwick a5811040e7 fix: initialize file editor and remove broken individual file uploads
Changes:
- Add fileEditor.init() call in DOMContentLoaded to activate edit buttons
- Remove individual file upload inputs (projectInput, svgInput, cssInput, csvInput)
  that had CORS issues when loading project configurations
- Keep only the folder picker which works reliably
- Update UI to emphasize folder picker as the primary loading method
- Remove corresponding event handlers from engine.js
- Remove tests for individual file upload functionality

The folder picker loads all project files in one operation without CORS
issues, while individual file uploads failed when trying to load
referenced files (CSV, SVG, CSS) from the project.json.

All 56 tests passing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 23:14:57 +01:00
example refactor: use abstract ITEM placeholders with dynamic property mapping 2025-11-27 23:17:34 +01:00
example-1 feat: add clean timeline example without swimlanes 2025-11-28 03:39:17 +01:00
my-project refactor: use abstract ITEM placeholders with dynamic property mapping 2025-11-27 23:17:34 +01:00
test fix: initialize file editor and remove broken individual file uploads 2026-01-23 23:14:57 +01:00
.gitignore feat: add Windows distribution build with cross-platform server scripts 2026-01-23 16:13:16 +01:00
CLAUDE.md feat: add folder picker for automatic project file loading 2026-01-23 16:34:35 +01:00
DEPENDS.md add: comprehensive TDD test infrastructure 2025-11-18 23:36:22 +01:00
engine.js fix: initialize file editor and remove broken individual file uploads 2026-01-23 23:14:57 +01:00
file-editor.js feat: add inline file editing with modification tracking and save functionality 2026-01-23 17:15:36 +01:00
generator.js feat: add custom placeholder mapping for non-standard templates 2025-11-28 03:24:33 +01:00
index.html fix: initialize file editor and remove broken individual file uploads 2026-01-23 23:14:57 +01:00
LICENSE init: first commit of chatgpt prebuild 2025-11-18 21:36:59 +01:00
Makefile feat: add inline file editing with modification tracking and save functionality 2026-01-23 17:15:36 +01:00
package.json test: improve test infrastructure and fix test assertions 2025-11-27 08:59:23 +01:00
README.md feat: add folder picker for automatic project file loading 2026-01-23 16:34:35 +01:00
REFACTORING_PLAN.md refactor: complete migration to template-v2 architecture 2025-11-27 15:29:58 +01:00
TEMPLATE_V2_GUIDE.md feat: add custom placeholder mapping for non-standard templates 2025-11-28 03:24:33 +01:00
TEST_FINDINGS.md test: improve test infrastructure and fix test assertions 2025-11-27 08:59:23 +01:00
TESTING.md add: comprehensive TDD test infrastructure 2025-11-18 23:36:22 +01:00
TimelineSvg.png chore: added project logo 2025-11-18 23:37:40 +01:00
TROUBLESHOOTING.md feat: add folder picker for automatic project file loading 2026-01-23 16:34:35 +01:00
vitest.config.js add: comprehensive TDD test infrastructure 2025-11-18 23:36:22 +01:00
WINDOWS_USAGE.md feat: add folder picker for automatic project file loading 2026-01-23 16:34:35 +01:00

README TimelineSvg

TimelineSvg is a lightweight, browser-based system for generating multi-lane timelines as clean, scalable SVG graphics. It reads simple CSV files, applies a configurable project definition, and renders a fully customizable timeline without requiring any backend or build pipeline.

All processing happens locally in the users browser — completely offline and fully private.


Features

  • Pure browser execution — no server, no installation
  • CSV-driven timelines with customizable field mappings
  • Automatic layout of months, lanes, and items
  • SVG templates with macros ({{MONTHS}}, {{LANES}})
  • Replaceable CSS and templates at runtime
  • Internal and external view modes
  • Offline SVG export (external view only)
  • Extremely easy to extend or theme

How It Works

TimelineSvg is built around three components:

1. project.json — The project configuration

Each project folder provides a project.json, defining:

{
  "name": "Example Project",
  "dataSource": "example/sample.csv",
  "stylesheet": "example/style.css",
  "svgTemplate": "example/template.svg",
  "settings": {
    "timelineMonths": 18
  },
  "fieldMapping": {
    "id": "ID",
    "title": "Title",
    "lane": "Lane",
    "due": ["Due"]
  }
}

This controls:

  • data source
  • styling
  • template structure
  • date range
  • field mapping between CSV and internal timeline model

2. CSV input

The CSV must contain at least:

  • a title
  • a date (any common format: YYYY-MM-DD, DD.MM.YYYY, etc.)
  • a lane/group field

Example:

ID,Title,Due,Lane
1,Implement API,2025-12-01,Backend
2,UI Prototype,2026-02-15,Frontend

3. Template-based SVG rendering

TimelineSvg replaces two macros in the template:

  • {{MONTHS}} → month labels and vertical grid lines
  • {{LANES}} → lane backgrounds, labels, and items

Example template:

<svg xmlns="http://www.w3.org/2000/svg">
  <rect width="100%" height="100%" fill="#FFFFFF"/>
  {{MONTHS}}
  {{LANES}}
</svg>

This makes TimelineSvg highly customizable: You can recreate any design, layout, or branding using your own SVG template.


Usage

1. Open the application

Just open index.html in any modern browser (Chrome, Firefox, Safari, Edge).

2. Load a project

You can choose between:

  • Automatic loading - When served via HTTP, the app auto-loads from project.json in project folders (binect/, my-project/, or example/)
  • Load Project Folder - Click "📂 Load Project Folder" and select an entire project directory. All files (project.json, CSV, CSS, SVG) will be loaded automatically
  • Load files individually - Upload project.json first, then manually upload CSV, CSS, and SVG files using the individual file buttons

3. Preview the timeline

The timeline renders automatically when the CSV loads and is displayed inside the viewer container.

4. Switch views

  • Internal View: IDs are visible
  • External View: IDs are hidden (used for export)

5. Export SVG

Click Download SVG → an external-view SVG is saved to disk.


Project Structure

/
│ index.html
│ engine.js
│ generator.js
│
├─ example/
│   ├─ project.json
│   ├─ style.css
│   ├─ template.svg
│   └─ sample.csv
│
└─ my-project/
    ├─ project.json
    ├─ style.css
    ├─ template.svg
    └─ data.csv

Customizing Your Own Project

To create your own timeline project:

  1. Duplicate the example/ folder
  2. Adjust project.json (dataSource, mappings, template)
  3. Replace the CSV with your data
  4. Modify the SVG template for your layout
  5. Open index.html and load your project

TimelineSvg will take care of the rest.


Why SVG?

  • infinitely scalable
  • editable in design tools
  • embeddable in documents, websites, and presentations
  • easy to script, style, and customize

Requirements

  • Any modern browser
  • No build tools
  • No server
  • No dependencies except PapaParse (bundled by CDN)

xxx