Gantt.

PRO

Arrange task durations and progress on a timeline.

Live preview36 feature examples

LIVE EXAMPLE

Project schedule

Match the page theme
Interact with the chart to see selection and range-change results here.
OptionsChanges are reflected in the preview and code.
Appearance and style6
Legend and interaction13
Title and dimensions3

Task durations, progress, and milestones. All values are sample data.

View code
Current preview
<div id="chart-container" style="width: 100%; min-width: 0;"></div>

<script type="module">
  import { defineCustomElement as define0 } from '@syidax/advanced-pro/components/sy-gantt-chart.js';
  define0();

  // Pro: complete registerLicense at app startup using your issued certificate.
  // The website preview certificate is not for use in customer apps.
  const specs = [
    {
      "id": "example-chart",
      "tag": "sy-gantt-chart",
      "props": {
        "data": [
          {
            "id": "research",
            "label": "Research",
            "start": "2026-01-05",
            "end": "2026-01-09",
            "progress": 1,
            "color": "#8263d9"
          },
          {
            "id": "design",
            "label": "Design",
            "start": "2026-01-08",
            "end": "2026-01-16",
            "progress": 0.65,
            "color": "#239c91"
          },
          {
            "id": "build",
            "label": "Implementation",
            "start": "2026-01-14",
            "end": "2026-01-26",
            "progress": 0.3,
            "color": "#e99954"
          },
          {
            "id": "launch",
            "label": "Release",
            "start": "2026-01-28",
            "milestone": true
          }
        ],
        "width": 640,
        "height": 360,
        "brandPosition": "bottom-right",
        "brandLogo": ""
      }
    }
  ];
  const container = document.querySelector('#chart-container');
  const elements = specs.map(({ tag, id, props }) => {
    const element = document.createElement(tag);
    element.id = id;
    Object.assign(element, props);
    element.setAttribute('aria-label', 'gantt example chart');
    return element;
  });
  container.replaceChildren(...elements);
  const chart = elements.at(-1);
  const onEvent = event => {
    console.log('taskClick', event.detail);
  };
  chart.addEventListener('taskClick', onEvent);
  const observer = new ResizeObserver(([entry]) => {
    const width = Math.max(160, Math.floor(entry.contentRect.width));
    elements.forEach(element => { element.width = width; });
  });
  observer.observe(container);

  // In an SPA, call this function when the view is disposed.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('taskClick', onEvent);
    container.replaceChildren();
  }
</script>

Usage and data

#

Manage project schedules, milestones, and baselines together.

This display example does not save tasks. Connect application persistence to editing events to save changes.

Data contract

PropertyInput format
dataAn array of tasks as { id, label, start, end?, progress?, milestone?, baseline? }. progress ranges from 0 to 1.

Updating data

Assign a new array or object to the property instead of mutating values inside an array. Chart events provide selection results through event.detail. When disposing of the view, clean up ResizeObserver and event listeners registered by your app.

Add to your interface

#

The code tabs below the preview contain the full data, options, event bindings, and responsive sizing for the current example. Copy them into an app project, such as Vite, that can resolve the installed packages.

Shared sy-chart API versus direct tags

API reference

#

The full public API for sy-gantt-chart. Pass objects and arrays as JavaScript properties. Select a name to view usage code and type definitions.

Key properties

Attribute / PropertyType / DefaultDescription
GanttDataDefault: undefinedAn array of tasks as { id, label, start, end?, progress?, milestone?, baseline? }. progress ranges from 0 to 1.
numberDefault: 900Chart width in pixels. Update with ResizeObserver when the container changes.
numberDefault: 400Chart height in pixels.
brandLogostringDefault: undefinedThe default is the Syidax logo. With the Pro chart.branding entitlement, use none or a PNG, JPEG, or WebP data URL.
brandPosition'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'Default: 'bottom-right'The corner where the logo is anchored. Applies equally to Community and Pro, on screen and in image exports.
barHeightnumberDefault: 24Maximum task bar height and gap in CSS pixels.
rowGapnumberDefault: 4Set as an HTML attribute or JavaScript property. type: number.
barRadiusnumberDefault: 3Set as an HTML attribute or JavaScript property. type: number.
progressShowbooleanDefault: trueSet as an HTML attribute or JavaScript property. type: boolean.
progressColorstringDefault: 'auto'Set as an HTML attribute or JavaScript property. type: string.
CartesianCrosshairInputDefault: undefinedPass as a JavaScript property. type: CartesianCrosshairInput.
taskLabelsGanttLabelModeDefault: 'auto'Allowed values: auto, show, hide. Default: 'auto'.
chartTitlestringDefault: undefinedThe title inside the chart. Explain the data's unit and meaning alongside it.
chartSubtitlestringDefault: undefinedThe subtitle inside the chart.
CartesianTooltipInputDefault: undefinedTooltip settings for pointer-driven values, position, and content.
tooltipEnabledbooleanDefault: trueSet as an HTML attribute or JavaScript property. type: boolean.
animatedbooleanDefault: falseWhether to animate initial display and data changes.
animationDurationnumberDefault: 600Animation duration in milliseconds.
animationEasingGanttEasingDefault: 'ease-out'Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'.
animationTypeGanttAnimationTypeDefault: undefinedAllowed values: initial, update. Default: undefined.
CartesianZoomInputDefault: undefinedSettings for zooming and the visible range.
Other properties 18
Attribute / PropertyType / DefaultDescription
taskLabelFormat(task:GanttTask)=>stringDefault: undefinedPass as a JavaScript property. type: (task:GanttTask)=>string.
timeDomainreadonly [number, number]Default: undefinedOptional full timeline extent in epoch milliseconds.
criticalPathGanttCriticalPathInputDefault: undefinedPass as a JavaScript property. type: GanttCriticalPathInput.
taskEditingGanttTaskEditingInputDefault: undefinedOpt-in task move/resize. Committed local edits are queried through getTasks/getTaskEdits; source updates supersede them.
GanttBaselineStyleInputDefault: undefinedReference-date strips, visible by default when tasks include baseline dates.
ReadonlyArray<GanttDependencyInput>Default: undefinedPass as a JavaScript property. type: ReadonlyArray<GanttDependencyInput>.
dependencyStyleGanttDependencyStyleInputDefault: undefinedPass as a JavaScript property. type: GanttDependencyStyleInput.
timeAxisGanttTimeAxisInputDefault: undefinedPass as a JavaScript property. type: GanttTimeAxisInput.
crosshairTimeUnitGanttCrosshairTimeUnitDefault: 'hour'Crosshair time badge precision; hour by default. Uses timeAxis.utc without changing event timestamps.
stringDefault: 'auto'Set as an HTML attribute or JavaScript property. type: string.
activeColorstringDefault: '#f59e0b'Set as an HTML attribute or JavaScript property. type: string.
enableMouseTrackingbooleanDefault: trueSet as an HTML attribute or JavaScript property. type: boolean.
tooltipFormat(detail: GanttHitDetail) => stringDefault: undefinedPass as a JavaScript property. type: (detail: GanttHitDetail) => string.
streamSourceGanttStreamSourceDefault: undefinedA stream source for live data. Check the contract for the specific type.
streamMaxnumberDefault: undefinedThe maximum number of streaming data points to retain.
streamWindownumberDefault: undefinedThe streaming data range to keep visible.
GanttEngineModeDefault: 'auto'Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type.
GanttUnavailableBehaviourDefault: 'fallback'Allowed values: fallback, error. Default: 'fallback'.
Events 22
EventsDetail typeDescription
GanttRenderResult & { tier: GanttEngineTier }Emits rendering results in detail when chart drawing completes.
GanttDependencyHitDetailCustomEvent.detail type: GanttDependencyHitDetail. Event names are case-sensitive.
GanttDependencyHitDetail | nullCustomEvent.detail type: GanttDependencyHitDetail | null. Event names are case-sensitive.
GanttDependencySelectionChangeCustomEvent.detail type: GanttDependencySelectionChange. Event names are case-sensitive.
GanttHitDetailCustomEvent.detail type: GanttHitDetail. Event names are case-sensitive.
GanttHitDetail | nullCustomEvent.detail type: GanttHitDetail | null. Event names are case-sensitive.
GanttTaskEditEventDetailCustomEvent.detail type: GanttTaskEditEventDetail. Event names are case-sensitive.
GanttTaskEditEventDetailCustomEvent.detail type: GanttTaskEditEventDetail. Event names are case-sensitive.
GanttTaskEditEventDetailCancelable before local dates, completion and row order commit. preventDefault restores the prior state.
GanttTaskEditEventDetailCustomEvent.detail type: GanttTaskEditEventDetail. Event names are case-sensitive.
GanttSelectionChangeEventDetailCustomEvent.detail type: GanttSelectionChangeEventDetail. Event names are case-sensitive.
ChartPointContextMenuEventDetail<GanttHitDetail>CustomEvent.detail type: ChartPointContextMenuEventDetail<GanttHitDetail>. Event names are case-sensitive.
{ count: number; replaced: number }CustomEvent.detail type: { count: number; replaced: number }. Event names are case-sensitive.
{ dropped: number }CustomEvent.detail type: { dropped: number }. Event names are case-sensitive.
CartesianTooltipEventDetailWhether to display the built-in tooltip.
voidCustomEvent.detail type: void. Event names are case-sensitive.
CartesianTooltipActionEventDetailCustomEvent.detail type: CartesianTooltipActionEventDetail. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
CartesianZoomChangeEventDetailCustomEvent.detail type: CartesianZoomChangeEventDetail. Event names are case-sensitive.
CartesianCrosshairEventDetail | nullCustomEvent.detail type: CartesianCrosshairEventDetail | null. Event names are case-sensitive.
Methods 50

Stencil methods return Promises. Use await within an async function to read the result.

Method / ArgumentsReturn typeDescription
Promise<GanttCriticalPathResult>An asynchronous method. Check the argument and return types below.
Promise<GanttDependencyDataset>An asynchronous method. Check the argument and return types below.
Promise<GanttDependencyPath[]>An asynchronous method. Check the argument and return types below.
cssX: number, cssY: numberPromise<GanttDependencyHitDetail|null>An asynchronous method. Check the argument and return types below.
Promise<GanttDependencySelection>An asynchronous method. Check the argument and return types below.
index: numberPromise<GanttDependencyHitDetail|null>An asynchronous method. Check the argument and return types below.
index: numberPromise<CartesianTooltipEventDetail|null>An asynchronous method. Check the argument and return types below.
Promise<GanttRenderResult>An asynchronous method. Check the argument and return types below.
Promise<ChartEngineStatus>Requested engine vs what runs, and why (CHART-ADD-08); a frozen or unlicensed chart reports the license outcome.
Promise<GanttEngineTier>An asynchronous method. Check the argument and return types below.
Promise<string | undefined>An asynchronous method. Check the argument and return types below.
data: GanttDataPromise<void>An asynchronous method. Check the argument and return types below.
Promise<GanttTask[]>An asynchronous method. Check the argument and return types below.
index: numberPromise<GanttTask | null>An asynchronous method. Check the argument and return types below.
id: stringPromise<GanttTask | null>An asynchronous method. Check the argument and return types below.
Promise<GanttDiagnostics>Normalization diagnostics for the effective base and stream source.
Promise<number>An asynchronous method. Check the argument and return types below.
Promise<GanttExtent>An asynchronous method. Check the argument and return types below.
Promise<GanttLayoutResult>An asynchronous method. Check the argument and return types below.
Promise<GanttBaselineComparison[]>Reference comparisons for every accepted task, including hidden/offscreen baselines. Positive variance means later or longer.
task: GanttTaskInputPromise<void>An asynchronous method. Check the argument and return types below.
tasks: ReadonlyArray<GanttTaskInput>Promise<void>An asynchronous method. Check the argument and return types below.
count: numberPromise<void>An asynchronous method. Check the argument and return types below.
tasks: ReadonlyArray<GanttTaskInput>Promise<void>An asynchronous method. Check the argument and return types below.
Promise<GanttStreamSource | undefined>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
options: { enabled?: boolean; duration?: number; easing?: GanttEasing; type?: GanttAnimationType }Promise<void>An asynchronous method. Check the argument and return types below.
cssX: number, cssY: numberPromise<GanttHitDetail | null>An asynchronous method. Check the argument and return types below.
index: numberPromise<GanttHitDetail | null>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<GanttSelection>An asynchronous method. Check the argument and return types below.
index: numberPromise<CartesianTooltipEventDetail | null>An asynchronous method. Check the argument and return types below.
index: numberPromise<CartesianTooltipEventDetail | null>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<GanttTaskEdit[]>Committed local dates, completion and displaced rows; never mutates caller data.
id?: stringPromise<void>An asynchronous method. Check the argument and return types below.
Promise<boolean>An asynchronous method. Check the argument and return types below.
request: CartesianZoomRequestPromise<CartesianZoomChangeEventDetail | null>Zoom to an explicit millisecond x window. Task rows do not accept y zoom requests.
factor: number, anchorFraction?: numberPromise<CartesianZoomChangeEventDetail | null>Scale the current windows by `factor` (< 1 zooms in) around `anchorFraction` (0..1, default centre).
delta: { x?: number; y?: number }Promise<CartesianZoomChangeEventDetail | null>Slide the zoomed windows by milliseconds (`{ x?, y? }`); a no-op at the full extent.
Promise<CartesianZoomChangeEventDetail | null>Back to the full diagram.
Promise<CartesianZoomState | null>The current zoom state (`null` = the full diagram).
request?: CartesianZoomExtentRequestPromise<CartesianZoomExtentDetail | null>The full timestamp extent and axis key (`null` before the first layout).
Promise<ChartDataTable>An asynchronous method. Check the argument and return types below.
Promise<GanttLabel[]>An asynchronous method. Check the argument and return types below.
Promise<GanttTimeAxisModel>An asynchronous method. Check the argument and return types below.
request: CartesianCrosshairShowRequestPromise<boolean>Quiet sync API: epoch milliseconds and a zero-based task row; no crosshairMove feedback loop.
Promise<void>An asynchronous method. Check the argument and return types below.