DayPilot.Gantt.dispose

The dispose() method destroys the JavaScript Gantt Chart component, removes the content of the placeholder <div>, unbinds DOM events, and cleans up the DayPilot.Gantt object so it can be garbage-collected.

Declaration

DayPilot.Gantt.dispose()

Parameters

This method has no parameters.

Notes

After calling dispose(), the DayPilot.Gantt object becomes unusable.

Example

const gantt = new DayPilot.Gantt("dp", {
  // ...
});
gantt.init();

// ...

gantt.dispose();

See Also

DayPilot.Gantt.disposed()

DayPilot.Gantt Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript