timeline

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package timeline builds and renders Gantt charts for cloop task plans.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderASCII

func RenderASCII(bars []Bar, useColor bool) string

RenderASCII renders a fixed-width Gantt chart to a string with ANSI color. useColor=false strips ANSI codes (for file output).

func RenderHTML

func RenderHTML(bars []Bar, title string) string

RenderHTML generates a self-contained HTML file with an SVG Gantt chart and inline JavaScript for tooltip hover.

Types

type Bar

type Bar struct {
	TaskID int
	Title  string
	Start  time.Time
	End    time.Time
	Status pm.TaskStatus
}

Bar represents a single task's time slot on the Gantt chart.

func Build

func Build(plan *pm.Plan, planStart time.Time) []Bar

Build computes the Gantt bars for a plan given an optional start time. Tasks are scheduled in topological order; each task starts after all its dependencies end and no earlier than planStart. Duration = ActualMinutes (if set) else EstimatedMinutes (if set) else 30 min.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL