Available only in PRO Edition
Overlay Extension
This functionality is available in the PRO edition only.
The overlay extension contains a set of API methods to simplify work with overlays. Read details about the Overlay extension in the article Custom Elements in Timeline Area.
Methods
The following methods are available via the gantt.ext.overlay object:
addOverlay
- addOverlay (render, id): string | number - adds a new overlay into the Gantt Chart and returns its id
- render - (Function): HTMLElement - the render function. Takes a container with custom content as a parameter
- container - (HTMLElement) - the overlay container
- id? - (number | string) - optional, the ID of the overlay
var overlay = gantt.ext.overlay.addOverlay(function(container){});
deleteOverlay
- deleteOverlay (id): boolean - removes an overlay by its id
- id - (number | string) - the ID of the overlay
gantt.ext.overlay.deleteOverlay(id);
getOverlaysIds
- getOverlaysIds (): Array<string> - returns an array with ids of overlays added into the chart
var ids = gantt.ext.overlay.getOverlaysIds();
refreshOverlay
- refreshOverlay (id): void - repaints the specified overlay.
- id - (number | string) - the ID of the overlay
gantt.ext.overlay.refreshOverlay(id);
showOverlay
- showOverlay (id): void - shows an overlay by its id.
- id - (number | string) - the ID of the overlay
gantt.ext.overlay.showOverlay(id);
hideOverlay
- hideOverlay (id): void - hides an overlay by its id
- id - (number | string) - the ID of the overlay
gantt.ext.overlay.hideOverlay(id);
isOverlayVisible
- isOverlayVisible (id): boolean - checks visibility of the specified overlay. Returns true if the overlay is visible.
- id - (number | string) - the ID of the overlay
var isVisible = gantt.ext.overlay.isOverlayVisible(id);
Back to top