Skip to main content

Interface: GanttChartOptions

Defined in: src/mobjects/graphing/GanttChart.ts:40

Options for creating a GanttChart.

Properties​

axisColor?​

optional axisColor: string

Defined in: src/mobjects/graphing/GanttChart.ts:56

Color for the axis, ticks and labels. Default: WHITE


barColors?​

optional barColors: string | readonly string[]

Defined in: src/mobjects/graphing/GanttChart.ts:50

Bar colors. Single color applies to all, array cycles by row. Default: palette.


barFillOpacity?​

optional barFillOpacity: number

Defined in: src/mobjects/graphing/GanttChart.ts:52

Fill opacity of the bars. Default: 0.9


barStrokeWidth?​

optional barStrokeWidth: number

Defined in: src/mobjects/graphing/GanttChart.ts:54

Stroke width of the bar outline. Default: 1.5


dependencyColor?​

optional dependencyColor: string

Defined in: src/mobjects/graphing/GanttChart.ts:74

Color for the dependency arrows. Default: WHITE


dependencyStrokeWidth?​

optional dependencyStrokeWidth: number

Defined in: src/mobjects/graphing/GanttChart.ts:76

Stroke width of the dependency arrows. Default: 2


formatTime()?​

optional formatTime: (value) => string

Defined in: src/mobjects/graphing/GanttChart.ts:64

Formatter for a tick value. Default: ISO date for Date input, else the number.

Parameters​

value​

number

Returns​

string


labelFontSize?​

optional labelFontSize: number

Defined in: src/mobjects/graphing/GanttChart.ts:70

Font size for the task labels. Default: 18


rowGap?​

optional rowGap: number

Defined in: src/mobjects/graphing/GanttChart.ts:48

Vertical gap between rows. Default: 0.2


rowHeight?​

optional rowHeight: number

Defined in: src/mobjects/graphing/GanttChart.ts:46

Height of each task bar. Default: 0.4


showDependencies?​

optional showDependencies: boolean

Defined in: src/mobjects/graphing/GanttChart.ts:72

Whether to draw dependency arrows between tasks. Default: false


showLabels?​

optional showLabels: boolean

Defined in: src/mobjects/graphing/GanttChart.ts:68

Whether to draw the per-row task labels. Default: true


showTimeAxis?​

optional showTimeAxis: boolean

Defined in: src/mobjects/graphing/GanttChart.ts:58

Whether to draw the time axis line and ticks. Default: true


tasks​

tasks: GanttTask[]

Defined in: src/mobjects/graphing/GanttChart.ts:42

Tasks to render, top to bottom in row order.


timeLabelFontSize?​

optional timeLabelFontSize: number

Defined in: src/mobjects/graphing/GanttChart.ts:66

Font size for the time-axis labels. Default: 18


timeTickCount?​

optional timeTickCount: number

Defined in: src/mobjects/graphing/GanttChart.ts:62

Number of evenly spaced ticks when timeTicks is not given. Default: 5


timeTicks?​

optional timeTicks: GanttTimeValue[]

Defined in: src/mobjects/graphing/GanttChart.ts:60

Explicit tick values on the time axis (overrides timeTickCount).


today?​

optional today: GanttTimeValue

Defined in: src/mobjects/graphing/GanttChart.ts:78

Optional "today" marker position (number or Date).


todayColor?​

optional todayColor: string

Defined in: src/mobjects/graphing/GanttChart.ts:80

Color for the today marker. Default: RED


todayStrokeWidth?​

optional todayStrokeWidth: number

Defined in: src/mobjects/graphing/GanttChart.ts:82

Stroke width of the today marker. Default: 2


width?​

optional width: number

Defined in: src/mobjects/graphing/GanttChart.ts:44

Visual width of the time axis. Default: 8