Skip to content

API

Attributes

NameDescriptionTypeDefault
getRowIdreturn row's id() => string
rowsrow dataRowData[]
columnstable columns, refer to ag-grid v30.0.6ColDef[]
defaultCola default column definition. Items defined in the actual column definitions get precedence.DefaultColDef
rowHeightevery row's heightnumber25
headerHeighttable and gantt view header heightnumber25
rowBufferthe number of rows rendered outside the viewable area the gantt rendersnumber5
rowSelectionrow selectionsingle / multiple / nonemultiple
defaultTableViewWidthtable view widthnumber350
maxTableViewWidthmax table view widthnumber1000
defaultPerHourSpacingper hour spacingnumber0.1
defaultTimeScaletime scaleday / week / month / quarter/ year
styleOptiongantt global style optionGanttStyleOption
defaultShowFirstLevelshow gantt first level headerbooleantrue
localeinternationalizationen / zh-cnbrowser's language
timePointComptime point componentComp
getEmptyRowsreturn rows data(count: number) => RowData[]
timeLineRendercustom time line componentComp
timeLineRenderParamstime line component paramsRecord<string, any>

Events

NameDescriptionType
select-changetriggers when user clicks the row(selectedIds: string[]) => void
expand-changetriggers when user expands or collapses a row(unExpandRowIds: string[]) => void
row-context-menutriggers when user right clicks the row(e: MouseEvent, rowId?: string | null) => void
cell-double-clickedtriggers when user double clicks the row(rowData: RowData | undefined, columnData?: ColDef) => void
gantt-mouse-downtriggers when user mouse down the row(e: MouseEvent, rowId?: string | null) => void
time-point-move-finishedtriggers after a time point has moved(timePoint: TimePoint, date: dayjs.Dayjs) => void
per-hour-spacing-changetriggers when time has scaled(perHourSpacing: number) => void
time-point-context-menutriggers when right click a time point(e: MouseEvent, timePoints: TimePoint[], rowData?: RowData) => void
time-line-stretch-changetriggers after a time line has stretched(rowId: string, timeLineIds: string[], startDate: dayjs.Dayjs | null, endDate: dayjs.Dayjs | null) => void
time-line-move-changetriggers after a time line has moved(rowId: string, timeLineIds: string[], movedTimeData: MovedTimeLineData[]) => void
view-port-changedwhich rows are rendered in the DOM has changed(data: RowData[]) => void | Promise<void>

Exposes

MethodDescriptionType
getRowNodeget row node by id(id: string) => GanttRowNode<RowData> | undefined
getRowNodeChildrenget row's children row nodes(parentId?: string) => GanttRowNode<RowData>[]
getRowDataListget rows original data() => RowData[]
freshRowNodesrefresh rows which have been updated(rows: RowData[]) => void
refreshCellsrefresh row's cell (ids: string[], force?: boolean) => void
getDisplayRowsget rows which rendered in the DOM() => RowData[] | null
expandAllexpand all rows() => void
freshTimeLinesrefresh time lines when time points have been updated(rowIds: string[]) => void
selectRowsselect rows by id(ids: string[]) => void

Released under the MIT License.