Type class
Shows an HTML modal which covers window or a chart area.
Click here For examples and docs on Popups and Modals.
Sources
Modal can be used (imported) via one of the following packages.
/** * -------------------------------------------------------- * Import from: "core.ts" * Use like: am4core.Modal * -------------------------------------------------------- */ import * as am4core from "@amcharts/amcharts4/core";
/** * -------------------------------------------------------- * Include via: <script src="core.js"></script> * Access items like: am4.Modal * -------------------------------------------------------- */
Inheritance
Modal extends Popup
.
Modal is not extended by any other symbol.
Properties
adapter # |
Type Default Adapter. |
---|---|
align # |
Type Default Inherited from Horizontal positioning of the content window. Available options: "left", "center" (default), "right", and "none". |
bottom # |
Type Inherited from "bottom" coordinate of a non-aligned ( Can be either absolute pixel value, or relative ( Setting this property will automatically set NOTE: The position is relative to the chart container. |
classPrefix # |
Type Inherited from A prefix that is applied to class names of various popup elements. |
clonedFrom # |
Type Inherited from Reference to the original object this object was cloned from. We need to keep this so we can disassociate it from source object when this object is disposed. |
closable # |
Type Inherited from Is popup closable? If it is, it can be closed in a number of ways, e.g. by hitting ESC key, clicking curtain, or clicking the close button. If it is not closable, the only way to close it is via |
config # |
Type Inherited from Use this property to set JSON-based config. When set, triggers processing routine, which will go through all properties, and try to apply values, create instances, etc. Use this with caution, as it is a time-consuming process. It's used for initialchart setup only, not routine operations. |
container # |
Type Inherited from A reference to an HTML element to be used for container. If not set, popup will cover the whole window. |
content # |
Type Inherited from Popup content. Popup content can be any valid HTML, including CSS. |
defaultStyles # |
Type Default Inherited from Should popup use default CSS? If default CSS is disabled, an external CSS should handle the look of the popup, since it will look quite out of place otherwise. |
draggable # |
Type Default Inherited from Can the popup be dragged with a pointer? |
dynamicResize # |
Type Default Inherited from Resize popup as images are being loaded. @since 4.9.17 |
elements # |
Type { close: Inherited from Returns an object with references to various elements of the Popup.
|
events # |
Type Inherited from An |
id # |
Type Inherited from Sets the user-defined id of the element. |
left # |
Type Inherited from "left" coordinate of a non-aligned ( Can be either absolute pixel value, or relative ( Setting this property will automatically set NOTE: The position is relative to the chart container. |
readerTitle # |
Type Inherited from A title for screen readers. It is very highly recommended to set that title so that people using screen reader tools can get an immediate summary of the information in the popup. |
right # |
Type Inherited from "right" coordinate of a non-aligned ( Can be either absolute pixel value, or relative ( Setting this property will automatically set NOTE: The position is relative to the chart container. |
showCurtain # |
Type Default Inherited from Should popup use dim out all content behind it? |
sprite # |
Type Inherited from A parent element this Popup belongs to. |
title # |
Type Inherited from Popup title. Popup title can be any valid HTML, including CSS. |
top # |
Type Inherited from "top" coordinate of a non-aligned ( Can be either absolute pixel value, or relative ( Setting this property will automatically set NOTE: The position is relative to the chart container. |
uid # |
Type Inherited from Returns object's internal unique ID. |
verticalAlign # |
Type Default Inherited from Vertical positioning of the content window. Available options: "top", "middle" (default), "bottom", and "none". |
There are 23 inherited items currently hidden from this list. |
Methods
clone( cloneId?: ) |
Returns Inherited from Makes a copy of this object and returns the clone. Try to avoid cloning complex objects like chart, create new instances if you need them. |
---|---|
close() |
Returns Inherited from Hides popup window. |
constructor() |
Returns Constructor |
copyFrom( source: ) |
Returns Inherited from Copies all properties and related data from different element. |
dispatch( eventType: ) |
Returns Inherited from Dispatches an event using own event dispatcher. Will automatically populate event data object with event type and target (this element). It also checks if there are any handlers registered for this sepecific event. |
dispatchImmediately( eventType: ) |
Returns Inherited from Works like |
dispose() |
Returns Inherited from Destroy (dispose) popup. |
getCurrentThemes() |
Returns Inherited from Returns a list of themes that should be applied to this element. It could either be a list of themes set explicitly on this element, or system-wide. |
isDisposed() |
Returns Inherited from Returns if this object has been already been disposed. |
open() |
Returns Inherited from Shows popup window. |
There are 9 inherited items currently hidden from this list. |
Events
#closed |
Param { type: Inherited from Invoked when Popup is closed. |
---|---|
#opened |
Param { type: Inherited from Invoked when Popup is opened. |
There are 2 inherited items currently hidden from this list. |
Adapters
#align |
Inherited from Applied to horizontal alignment of the popup. |
---|---|
#bottom |
Param Inherited from Applied to |
#classNames |
Param { closeClass: Inherited from Applied to class names list that are added as class for various popup elements. |
#classPrefix |
Param Inherited from Applied to the class prefixes. |
#closable |
Param Inherited from Applied to |
#content |
Param Inherited from Applied to popup content before it is shown. |
#defaultStyles |
Param Inherited from Applied to default |
#draggable |
Param Inherited from Applied to default |
#dynamicResize |
Param Inherited from Applied to |
#left |
Param Inherited from Applied to |
#readerTitle |
Param Inherited from Applied to the screen reader title. |
#right |
Param Inherited from Applied to |
#showCurtain |
Param Inherited from Applied to default |
#title |
Param Inherited from Applied to popup title before it is shown. |
#top |
Param Inherited from Applied to |
#verticalAlign |
Param Inherited from Applied to vertical alignment of the popup. |
There are 16 inherited items currently hidden from this list. |