Skip to main content

destructor

Description

Destroys the gantt instance

destructor: () => void

Example

const myGantt = Gantt.getGanttInstance();

//destroying a gantt instance
myGantt.destructor();

Details

The method destroys a gantt instance and calls the onDestroy event.

Calling a destructor will:

  • clear the data loaded into a gantt instance
  • destroy the dataProcessor (if it is attached to the gantt)
  • detach the gantt from DOM
  • detach all DOM events attached via the event and attachEvent methods
note

Starting from v10, multiple Gantt instances are supported in all editions (the free Community edition and the PRO editions). In legacy versions that do not allow creating multiple instances (the GPL edition in v9.x and earlier, or the single-domain Commercial build), calling the gantt destructor will make gantt inaccessible until page reload.

Change log

  • added in version 5.1
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.