Gantt Toolbar
getGanttBaselineCaptureRuntime
Section titled “getGanttBaselineCaptureRuntime”export async function getGanttBaselineCaptureRuntime( grid: HTMLRevoGridElement,): Promise<GanttBaselineCaptureRuntime | undefined>;captureGanttBaseline
Section titled “captureGanttBaseline”export async function captureGanttBaseline( grid: HTMLRevoGridElement, options?: CaptureBaselineOptions,): Promise<BaselineSnapshot | null>;GanttBaselineCaptureRuntime
Section titled “GanttBaselineCaptureRuntime”interface GanttBaselineCaptureRuntime { captureBaseline(options?: CaptureBaselineOptions): BaselineSnapshot | null}toggleGanttCriticalPath
Section titled “toggleGanttCriticalPath”Toggle critical-path highlighting on the grid’s Gantt visual config.
Returns the next visibility state, or undefined when the grid has no
Gantt config to update.
export function toggleGanttCriticalPath(grid: HTMLRevoGridElement): boolean | undefined;getCsvExportPlugin
Section titled “getCsvExportPlugin”export async function getCsvExportPlugin(grid: HTMLRevoGridElement): Promise<RevoGridCsvExportPlugin | undefined>;exportGanttCsv
Section titled “exportGanttCsv”export async function exportGanttCsv( grid: HTMLRevoGridElement, options: GanttCsvExportOptions =;exportGanttExcel
Section titled “exportGanttExcel”export function exportGanttExcel( grid: HTMLRevoGridElement, options: GanttExcelExportOptions =;GanttCsvExportOptions
Section titled “GanttCsvExportOptions”interface GanttCsvExportOptions { filename?: string; bom?: boolean; columnDelimiter?: string; rowDelimiter?: string; mime?: string; encoding?: string}GanttExcelExportOptions
Section titled “GanttExcelExportOptions”export type GanttExcelExportOptions = ExportExcelEvent;RevoGridCsvExportPlugin
Section titled “RevoGridCsvExportPlugin”interface RevoGridCsvExportPlugin { exportFile(options?: GanttCsvExportOptions): Promise<void>}getGanttTimelineNavigationRuntime
Section titled “getGanttTimelineNavigationRuntime”export async function getGanttTimelineNavigationRuntime( grid: HTMLRevoGridElement,): Promise<GanttTimelineNavigationRuntime | undefined>;scrollGanttToToday
Section titled “scrollGanttToToday”export async function scrollGanttToToday( grid: HTMLRevoGridElement, options: GanttTodayNavigationOptions =;fitGanttToProject
Section titled “fitGanttToProject”export async function fitGanttToProject( grid: HTMLRevoGridElement, options: GanttProjectFitOptions =;GanttTimelineNavigationOptions
Section titled “GanttTimelineNavigationOptions”interface GanttTimelineNavigationOptions { align?: number}GanttTodayNavigationOptions (Extended from index.ts)
Section titled “GanttTodayNavigationOptions (Extended from index.ts)”interface GanttTodayNavigationOptions { date?: ISODateString}GanttProjectFitOptions (Extended from index.ts)
Section titled “GanttProjectFitOptions (Extended from index.ts)”interface GanttProjectFitOptions { viewportWidth?: number}GanttTimelineNavigationRuntime
Section titled “GanttTimelineNavigationRuntime”interface GanttTimelineNavigationRuntime { scrollToToday?: () => Promise<void> | void; fitToProject?: () => Promise<void> | void; getZoomLevel?: () => { id?: string } | null | undefined; setZoomLevel?: (levelId: string) => boolean}createGanttToolbarQuickWinActions
Section titled “createGanttToolbarQuickWinActions”Framework-neutral command descriptors for common Gantt toolbar additions.
Render the returned commands in any toolbar UI and call run() from the
button handler. Creating the descriptors does not dispatch events, scroll, or
mutate the grid.
export function createGanttToolbarQuickWinActions( grid: HTMLRevoGridElement, options: GanttToolbarQuickWinOptions =;listGanttToolbarQuickWinActions
Section titled “listGanttToolbarQuickWinActions”export function listGanttToolbarQuickWinActions( actions: GanttToolbarQuickWinActions,): readonly GanttToolbarQuickWinAction[];GanttToolbarQuickWinActionId
Section titled “GanttToolbarQuickWinActionId”export type GanttToolbarQuickWinActionId = | 'export-csv' | 'export-excel' | 'capture-baseline' | 'toggle-critical-path' | 'timeline-today' | 'timeline-fit-project';GanttToolbarQuickWinAction
Section titled “GanttToolbarQuickWinAction”interface GanttToolbarQuickWinAction { readonly id: GanttToolbarQuickWinActionId; readonly label: string; readonly title: string; readonly run: () => Result | Promise<Result>}GanttToolbarQuickWinOptions
Section titled “GanttToolbarQuickWinOptions”interface GanttToolbarQuickWinOptions { readonly csv?: GanttCsvExportOptions | false; readonly excel?: GanttExcelExportOptions | false; readonly baseline?: CaptureBaselineOptions | false; readonly criticalPath?: false; readonly today?: GanttTodayNavigationOptions | false; readonly fitToProject?: GanttProjectFitOptions | false}GanttToolbarQuickWinActions
Section titled “GanttToolbarQuickWinActions”interface GanttToolbarQuickWinActions { readonly exportCsv?: GanttToolbarQuickWinAction<boolean>; readonly exportExcel?: GanttToolbarQuickWinAction<CustomEvent<GanttExcelExportOptions>>; readonly captureBaseline?: GanttToolbarQuickWinAction<BaselineSnapshot | null>; readonly toggleCriticalPath?: GanttToolbarQuickWinAction<boolean | undefined>; readonly scrollToToday?: GanttToolbarQuickWinAction<boolean>; readonly fitToProject?: GanttToolbarQuickWinAction<boolean>}resolveHiddenColumnsFromToolbarSelection
Section titled “resolveHiddenColumnsFromToolbarSelection”export function resolveHiddenColumnsFromToolbarSelection( selectedValues: string | string[], allProps: string[], previousHiddenColumns: string[],): string[];GANTT_TOOLBAR_SELECT_ALL_COLUMNS
Section titled “GANTT_TOOLBAR_SELECT_ALL_COLUMNS”GANTT_TOOLBAR_SELECT_ALL_COLUMNS: string;GanttToolbar
Section titled “GanttToolbar”GanttToolbar: ({ grid, columns, visuals: initialVisuals, controls }: GanttToolbarComponentProps) => preact.JSX.Element;GanttToolbarColumnOption
Section titled “GanttToolbarColumnOption”A single column entry shown in the Gantt toolbar column-visibility dropdown.
interface GanttToolbarColumnOption { /** Property name matching a task-table column (e.g. `'wbs'`, `'status'`). */ prop: string; /** Human-readable label shown in the dropdown. */ label: string; /** * Whether the column is visible by default. * Columns with `visible: false` will be added to `grid.hideColumns` on mount. * @default true */ visible?: boolean}GanttToolbarVisuals
Section titled “GanttToolbarVisuals”Initial visual toggle state passed to the toolbar.
interface GanttToolbarVisuals { showBaseline?: boolean; showDependencies?: boolean; showCriticalPath?: boolean}GanttToolbarControls
Section titled “GanttToolbarControls”Visibility switches for each toolbar control or control group.
interface GanttToolbarControls { search?: boolean; history?: boolean; undo?: boolean; redo?: boolean; tree?: boolean; expandAll?: boolean; collapseAll?: boolean; zoom?: boolean; zoomIn?: boolean; zoomOut?: boolean; tasks?: boolean; addTask?: boolean; indent?: boolean; outdent?: boolean; export?: boolean; exportExcel?: boolean; columns?: boolean; dependencies?: boolean; baseline?: boolean; criticalPath?: boolean}GanttToolbarOptions
Section titled “GanttToolbarOptions”Options accepted by {@link defineGanttToolbar}.
interface GanttToolbarOptions { /** The `revo-grid` element the toolbar should control. */ grid: HTMLRevoGridElement; /** * Column options to show in the visibility dropdown. * If omitted, no column dropdown is rendered. */ columns?: GanttToolbarColumnOption[]; /** * Initial state of the visual/scheduling toggles. * When omitted, values are read from the current `grid.gantt.visuals` config. */ visuals?: GanttToolbarVisuals; /** * Per-control visibility. Omitted options default to visible, except * `baseline`, which is opt-in to keep the default command bar compact. */ controls?: GanttToolbarControls}ganttToolbarDependencies
Section titled “ganttToolbarDependencies”Dependencies
Section titled “Dependencies”- Optional
HistoryPlugin: Integrates with HistoryPlugin undo and redo controls when present. - Optional
GanttPlugin: Integrates with Gantt runtime zoom and editing capabilities when present. - Event integration
gantt-runtime: Dispatches and listens to Pro and Gantt events for toolbar controls.
ganttToolbarDependencies: PluginDependency[];defineGanttToolbar
Section titled “defineGanttToolbar”Mounts the Gantt editing toolbar into el and wires it to the given
revo-grid element. Call this once after the grid’s gantt property
has been set so the toolbar can read the initial visual config.
controls hides built-in controls. Omitted flags are visible by default,
except baseline, which is opt-in.
Example
Section titled “Example”import { defineGanttToolbar } from '@revolist/revogrid-enterprise';
const toolbarEl = document.querySelector('#gantt-toolbar');const grid = document.querySelector('revo-grid');
defineGanttToolbar(toolbarEl, { grid, columns: [ { prop: 'wbs', label: 'WBS', visible: true }, { prop: 'name', label: 'Name', visible: true }, { prop: 'startDate', label: 'Start Date', visible: true }, { prop: 'duration', label: 'Duration', visible: true }, { prop: 'status', label: 'Status', visible: true }, { prop: 'endDate', label: 'End Date', visible: false }, ], visuals: { showDependencies: true, showBaseline: true, showCriticalPath: true, }, controls: { search: true, history: true, undo: true, redo: true, tree: true, expandAll: true, collapseAll: true, zoom: true, zoomIn: true, zoomOut: true, tasks: true, addTask: true, indent: true, outdent: true, export: true, exportExcel: true, columns: true, dependencies: true, baseline: true, criticalPath: true, },});defineGanttToolbar: (el: HTMLElement, options: GanttToolbarOptions) => void;