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
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot