Why Angular Teams Choose ApexGantt

The ngx-apexgantt package exposes the chart as a real Angular component, <ngx-apexgantt>, with typed Inputs, EventEmitter Outputs, @ViewChild access, and first-class support for both standalone and module-based applications, not a thin shell around an imperative library that leaves you fighting ngOnDestroy, change detection, and zone leaks. It shares its core engine with ApexGantt's React, Vue, and JavaScript wrappers, so the task data model stays consistent if your stack grows beyond Angular. Learn about the full ApexGantt component →

Drag-and-Drop Scheduling with Typed Outputs

Drag tasks to reschedule, resize bars, and draw dependency arrows on the timeline. Each interaction fires an EventEmitter Output (taskDragged, taskResized, taskUpdateSuccess) you bind with (event)= syntax to persist edits or trigger workflows. Watch the scripted plan move, then grab a bar yourself.


Critical Path That Recomputes on Every Edit

ApexGantt highlights the longest chain of dependent tasks that drives your finish date. Update the [tasks] binding or call update() through @ViewChild and the critical path recomputes automatically. Watch it re-route between the two branches below.


Baselines for Planned vs. Actual

Attach a planned (baseline) range to each task in the same tasks array and ApexGantt draws a thin reference bar beneath the live one, so schedule variance is visible at a glance. No separate data structure required. The demo drifts the actuals past plan to show a slipping project.


Multiple View Modes via a Single Input

Bind the [viewMode] Input to switch between day, week, month, quarter, and year scales; change detection picks it up with no data re-query. This one auto-zooms; interact to take the controls.

Task Dependencies

Finish-to-start, start-to-start, and finish-to-finish links with lag, set on the [tasks] you bind.

Milestones

Zero-duration diamond markers for gates, releases, and key dates.

Annotations

Pin sprint boundaries, deadlines, or notes to specific dates through the options Input.

Configurable Columns

Define the task-table columns with columnConfig and the ColumnKey enum.

Rich HTML Tooltips

Templatable tooltips showing dates, duration, progress, and dependencies.

Custom Colors & Dark Theme

Bind the [theme] Input; deeper styling via the options object (GanttOptions).

SVG Export

Export timelines to high-quality SVG with every task and dependency preserved.

TypeScript Types

Definitions ship for NgxApexGanttComponent, GanttOptions, TaskInput, ColumnKey, and the event detail types.

Install in Your Angular App

ApexGantt for Angular requires two packages: the Angular wrapper and the core engine.

npm install ngx-apexgantt apexgantt
# or
yarn add ngx-apexgantt apexgantt

A complete working Gantt chart in one standalone component:

import { Component } from "@angular/core"
import { NgxApexGanttComponent, TaskInput } from "ngx-apexgantt"

@Component({
  selector: "app-timeline",
  standalone: true,
  imports: [NgxApexGanttComponent],
  template: `
    <ngx-apexgantt
      [tasks]="tasks"
      [viewMode]="'week'"
      [height]="'500px'"
    ></ngx-apexgantt>
  `
})
export class TimelineComponent {
  tasks: TaskInput[] = [
    { id: "task-1", name: "Design",      startTime: "01-01-2026", endTime: "01-15-2026", progress: 75 },
    { id: "task-2", name: "Development", startTime: "01-16-2026", endTime: "02-28-2026", progress: 40, dependency: "task-1" },
    { id: "task-3", name: "QA",          startTime: "03-01-2026", endTime: "03-15-2026", progress: 0,  dependency: "task-2" }
  ]
}

For a module-based app, import NgxApexGanttModule into the relevant @NgModule instead. The viewMode Input accepts "day", "week", "month", "quarter", or "year".

Working with @ViewChild and Events

ApexGantt's Outputs keep your Angular state in sync with the timeline, and a @ViewChild reference drives the chart imperatively when you need it:

import { Component, ViewChild } from "@angular/core"
import {
  NgxApexGanttComponent,
  TaskInput,
  TaskDraggedEventDetail,
  TaskResizedEventDetail,
  TaskUpdateSuccessEventDetail
} from "ngx-apexgantt"

@Component({
  selector: "app-schedule-editor",
  standalone: true,
  imports: [NgxApexGanttComponent],
  template: `
    <button (click)="ganttChart.zoomIn()">Zoom In</button>
    <button (click)="ganttChart.zoomOut()">Zoom Out</button>

    <ngx-apexgantt
      #ganttChart
      [tasks]="tasks"
      [viewMode]="'week'"
      [height]="'600px'"
      (taskDragged)="onTaskDragged($event)"
      (taskResized)="onTaskResized($event)"
      (taskUpdateSuccess)="onTaskUpdateSuccess($event)"
    ></ngx-apexgantt>
  `
})
export class ScheduleEditorComponent {
  @ViewChild("ganttChart") ganttChart!: NgxApexGanttComponent

  tasks: TaskInput[] = [/* ... */]

  onTaskDragged(event: TaskDraggedEventDetail) { console.log("dragged", event) }
  onTaskResized(event: TaskResizedEventDetail) { console.log("resized", event) }
  onTaskUpdateSuccess(event: TaskUpdateSuccessEventDetail) {
    // persist to your backend
    fetch(`/api/tasks/${event.taskId}`, { method: "PATCH", body: JSON.stringify(event.updatedTask) })
  }
}

v1.1.0 exposes three Outputs (taskUpdateSuccess, taskDragged, taskResized) and the @ViewChild methods update, updateTask, zoomIn, zoomOut, and destroy. Payloads match the shipped detail types: taskUpdateSuccess carries { taskId, updatedTask, timestamp }.

Customization, Theming, and Columns

Bind [theme]="'dark'" for a one-line theme switch. For deeper control, pass a GanttOptions object through the options Input and configure the task table with columnConfig and the ColumnKey enum:

import { GanttOptions, ColumnKey } from "ngx-apexgantt"

ganttOptions: GanttOptions = {
  series: this.tasks,
  enableToolbar: true,
  enableTaskDrag: true,
  enableTaskResize: true,
  barBackgroundColor: "#537CFA",
  rowHeight: 32,
  columnConfig: [
    { key: ColumnKey.Name,      title: "Task Name", minWidth: "100px", flexGrow: 3 },
    { key: ColumnKey.StartTime, title: "Start",     minWidth: "100px", flexGrow: 1.5 },
    { key: ColumnKey.Duration,  title: "Duration",  minWidth: "80px",  flexGrow: 1 }
  ]
}

Mapping Your API Shape Inline

API responses rarely match the field names ApexGantt expects. Add a parsing config inside GanttOptions to map your shape without hand-written transformation code:

ganttOptions: GanttOptions = {
  series: this.apiData,  // raw API response
  parsing: {
    id:        "task_id",
    name:      "task_name",
    startTime: "start_date",
    endTime:   "end_date",
    progress:  "completion"
  },
  height: "500px"
}

TypeScript Support in Angular

ngx-apexgantt ships TypeScript definitions for the component, the task data model, configuration, view modes, the column-key enum, and the event detail types:

import {
  NgxApexGanttComponent,
  GanttOptions,
  TaskInput,
  ViewMode,
  ColumnKey,
  TaskUpdateSuccessEventDetail,
  TaskDraggedEventDetail
} from "ngx-apexgantt"

ngx-apexgantt v1.1.0 targets Angular 18 (@angular/core and @angular/common ^18.0.0 peer dependencies).

Commercial License Setup

If you have a commercial ApexGantt license, set it once with the static setter, called before bootstrapApplication:

// main.ts
import { bootstrapApplication } from "@angular/platform-browser"
import { setApexGanttLicense } from "ngx-apexgantt"
import { AppComponent } from "./app/app.component"
import { appConfig } from "./app/app.config"

setApexGanttLicense("your-license-key-here")
bootstrapApplication(AppComponent, appConfig)

The community edition runs without a license key.

Performance with Large Angular Gantt Timelines

ApexGantt renders large project timelines quickly. On an Apple M4 Pro (apexgantt 3.11.1, headless Chromium):

~65 ms1,000 tasks
~275 ms5,000 tasks
~620 ms10,000 tasks

Angular Gantt Chart FAQ

How do I install ApexGantt for Angular?

Run npm install ngx-apexgantt apexgantt. Both packages are required: ngx-apexgantt is the Angular wrapper, and apexgantt is the core engine it depends on. Import NgxApexGanttComponent (standalone) or NgxApexGanttModule (module-based) from ngx-apexgantt.

Does ApexGantt work with Angular standalone components?

Yes. Add NgxApexGanttComponent to your standalone component's imports array and use ngx-apexgantt in the template. The package supports both standalone and module-based applications as first-class patterns.

How do I set the commercial license in an Angular app?

Call setApexGanttLicense("key") before bootstrapApplication in main.ts. The community edition runs without a license key.

How do I access chart methods programmatically?

Get a reference to the component with @ViewChild("ganttChart") ganttChart!: NgxApexGanttComponent, then call ganttChart.zoomIn(), ganttChart.zoomOut(), ganttChart.update(options), ganttChart.updateTask(taskId, data), or ganttChart.destroy().

Does ApexGantt support TypeScript in Angular?

Yes. Type definitions ship with the package, covering the component, GanttOptions, TaskInput, ViewMode, ColumnKey, and event detail types (TaskUpdateSuccessEventDetail, TaskDraggedEventDetail, and more). No separate @types/ install is required.

Does ApexGantt support critical path and baselines?

Yes. Critical path highlighting and baseline (planned-vs-actual) tracking are built in, configurable through the same GanttOptions you use for everything else. Worked demos live at /apexgantt/demos/critical-path/ and /apexgantt/demos/baseline/.

Ready to build your Angular project timeline?

The fastest path is the demos: running examples you can read and copy from.

See ApexGantt Demos
Angular Gantt Chart Component | ApexGantt