Skip to content
PixiKit

Plan Bars

A project timeline being planned: bars grow in on a week grid, one is dragged a week later and pushes the task that depends on it, then another is stretched while the end date rolls. Visitors can drag bars, pull their right edge, or use the arrow keys.

pixikit.com/docs/blocks/illustrations/plan-bars

Customize

Weeks6
Today2.4
Autoplay
Loop
Speed1.0x
Height360px
Width560px

Props

16
NameTypeDefaultDescription
tasksPlanBarsTask[]DEFAULT_TASKSThe tasks, one bar each.
weeksnumber6How many week columns the grid has.
todaynumber2.4Where the today line sits, in weeks; may be fractional.
titlestring"Launch plan"The name in the top bar.
weekLabelstring"W{n}"The week label above each column; {n} is the week number.
rangeLabelstring"{n} weeks"The range label in the top bar; {n} is the number of weeks.
statusLabels[string, string]["On track", "Moved"]The two status pill labels: on track, then moved.
barLabelstring"{name}, starts week {start}, {length} weeks"What a screen reader says for a bar; {name}, {start} and {length} are filled in.
onChange(tasks: PlanBarsTask[]) => voidNoneCalled with the new tasks when a visitor moves or resizes a bar.
autoplaybooleantrueStarts when the scene scrolls into view; when off it waits for a click on replay.
loopbooleantruePlays again from the start layout after the hold.
speednumber1Playback speed multiplier.
heightnumber360The height of the scene in px.
widthnumber560The widest the scene grows, in px. It shrinks to fit a narrower parent.
replayLabelstring"Replay"What screen readers call the replay button.
classNamestringNone

Related