View as Markdown

API reference: @salmonui/gantt

GanttTimelineinterface

import type { GanttTimeline } from '@salmonui/gantt';
interface GanttTimeline {
    readonly mode?: 'hour' | 'day' | 'week' | 'month' | 'year';
    readonly topTier?: GanttTier | null;
    readonly bottomTier?: GanttTier;
    readonly unitWidth?: number;
    readonly weekStart?: number;
    readonly renderCell?: (ctx: GanttTimelineCellContext) => ReactNode;
    readonly infinite?: boolean;
    readonly tooltips?: boolean;
}

timeline.

GanttTimeline members (8)
NameSignatureDescription
modeoptionalreadonly mode?: 'hour' | 'day' | 'week' | 'month' | 'year';

Tier preset. Default 'week'.

topTieroptionalreadonly topTier?: GanttTier | null;
bottomTieroptionalreadonly bottomTier?: GanttTier;
unitWidthoptionalreadonly unitWidth?: number;

Width of one bottom-tier cell in px (timelineUnitSize). Default 33.

weekStartoptionalreadonly weekStart?: number;

First day of week (0 = Sunday). Default from locale.

renderCelloptionalreadonly renderCell?: (ctx: GanttTimelineCellContext) => ReactNode;
infiniteoptionalreadonly infinite?: boolean;

Extends the range when scrolled to an edge (enableInfiniteTimelineScroll).

tooltipsoptionalreadonly tooltips?: boolean;

Tier cell tooltips (the full date). Default true.