Skip to content

ChartElement

Type classSince 5.21.0

A chart as an HTML element: <am5-chart>, built from a JSON config.

<am5-chart themes="Animated" style="height: 400px" config='{ "type": "PieChart", ... }'></am5-chart>

The config is given with the config attribute or property (an object or a JSON string), or loaded from a URL with src. Themes are not part of a config: set them with the themes property (theme classes, or a class with its settings: [am5themes_Adaptive, { baseColor: "#4150a0" }]), or with the themes attribute (names, for the script version, where each theme is a global: themes="Animated", or as JSON with settings:

themes='["Animated", ["Adaptive", { "baseColor": "#4150a0" }]]').

renderer="svg" draws the chart as SVG.

A config names geodata and locales instead of carrying them ("geoJSON": "am5geodata_worldLow"). The script version defines them as globals; with npm imports, give them in the resources property:

element.resources = { am5geodata_worldLow }.

With script tags, load index.js, plugins/json.js and element.js, and then the chart types the config uses, e.g. percent.js.

The element dispatches ready when the chart is built, with root and chart in its detail, and error when it could not be. A config given in the page can be built before a script adds its listener: whenReady() works whenever it is called.

Without a height of its own, from CSS or its parent, the element is 400 pixels high.

More info: The Elementrmation

More info: Serializing / JSON config for the config format

Sources

ChartElement can be used (imported) via one of the following packages.

// Import ChartElement
import * as am5element from "@amcharts/amcharts5/element";
// Create ChartElement
am5element.ChartElement.new(root, {
// ... config if applicable
});

Inheritance

ChartElement extends HTMLElement.

ChartElement is not extended by any other symbol.

Properties

chart

Type Entity | undefined

What the config built, usually the chart, once it is built.

config

Type object | string | undefined

The chart's JSON config: an object, or a JSON string. Setting it builds the chart again.

HTMLElement

StaticType { prototype: HTMLElement }

resources

Type object | undefinedSince 5.21.4

Objects the config names instead of carrying them: geodata packs and locales, by the names the config uses, e.g.

{ am5geodata_worldLow, am5locales_de_DE }. Needed with npm imports;

the script version defines them as globals. Setting them builds the chart again.

root

Type Root | undefined

The chart's root element, once it is built.

themes

Type Array | undefined

Themes for the chart: theme classes, e.g. [am5themes_Animated], or a class with its settings, e.g.

[am5themes_Animated, [am5themes_Adaptive, { baseColor: "#4150a0" }]].

Setting them builds the chart again.

173 inherited items
accessKey

Type stringInherited from HTMLElement

accessKeyLabel

Type stringInherited from HTMLElement

assignedSlot

Type HTMLSlotElement | nullInherited from Element

ATTRIBUTE_NODE

Type numberInherited from Node

attributes

Type NamedNodeMapInherited from Element

autocapitalize

Type stringInherited from HTMLElement

baseURI

Type stringInherited from Node

Returns node's node document's document base URL.

CDATA_SECTION_NODE

Type numberInherited from Node

node is a CDATASection node.

childElementCount

Type numberInherited from ParentNode

childNodes

Type NodeListOfInherited from Node

Returns the children.

children

Type HTMLCollectionInherited from ParentNode

Returns the child elements.

classList

Type DOMTokenListInherited from Element

Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.

className

Type stringInherited from Element

Returns the value of element's class content attribute. Can be set to change it.

clientHeight

Type numberInherited from Element

clientLeft

Type numberInherited from Element

clientTop

Type numberInherited from Element

clientWidth

Type numberInherited from Element

COMMENT_NODE

Type numberInherited from Node

node is a Comment node.

contentEditable

Type stringInherited from ElementContentEditable

dataset

Type DOMStringMapInherited from HTMLOrSVGElement

dir

Type stringInherited from HTMLElement

DOCUMENT_FRAGMENT_NODE

Type numberInherited from Node

node is a DocumentFragment node.

DOCUMENT_NODE

Type numberInherited from Node

node is a document.

DOCUMENT_POSITION_CONTAINED_BY

Type numberInherited from Node

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINS

Type numberInherited from Node

Set when other is an ancestor of node.

DOCUMENT_POSITION_DISCONNECTED

Type numberInherited from Node

Set when node and other are not in the same tree.

DOCUMENT_POSITION_FOLLOWING

Type numberInherited from Node

Set when other is following node.

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

Type numberInherited from Node

DOCUMENT_POSITION_PRECEDING

Type numberInherited from Node

Set when other is preceding node.

DOCUMENT_TYPE_NODE

Type numberInherited from Node

node is a doctype.

draggable

Type booleanInherited from HTMLElement

ELEMENT_NODE

Type numberInherited from Node

node is an element.

ENTITY_NODE

Type numberInherited from Node

ENTITY_REFERENCE_NODE

Type numberInherited from Node

firstChild

Type ChildNode | nullInherited from Node

Returns the first child.

firstElementChild

Type Element | nullInherited from ParentNode

Returns the first child that is an element, and null otherwise.

hidden

Type booleanInherited from HTMLElement

id

Type stringInherited from Element

Returns the value of element's id content attribute. Can be set to change it.

innerHTML

Type stringInherited from InnerHTML

innerText

Type stringInherited from HTMLElement

inputMode

Type stringInherited from ElementContentEditable

isConnected

Type booleanInherited from Node

Returns true if node is connected and false otherwise.

isContentEditable

Type booleanInherited from ElementContentEditable

lang

Type stringInherited from HTMLElement

lastChild

Type ChildNode | nullInherited from Node

Returns the last child.

lastElementChild

Type Element | nullInherited from ParentNode

Returns the last child that is an element, and null otherwise.

localName

Type stringInherited from Element

Returns the local name.

namespaceURI

Type string | nullInherited from Element

Returns the namespace.

nextElementSibling

Type Element | nullInherited from NonDocumentTypeChildNode

Returns the first following sibling that is an element, and null otherwise.

nextSibling

Type ChildNode | nullInherited from Node

Returns the next sibling.

nodeName

Type stringInherited from Node

Returns a string appropriate for the type of node.

nodeType

Type numberInherited from Node

Returns the type of node.

nodeValue

Type string | nullInherited from Node

nonce

Type undefined | stringInherited from HTMLOrSVGElement

NOTATION_NODE

Type numberInherited from Node

offsetHeight

Type numberInherited from HTMLElement

offsetLeft

Type numberInherited from HTMLElement

offsetParent

Type Element | nullInherited from HTMLElement

offsetTop

Type numberInherited from HTMLElement

offsetWidth

Type numberInherited from HTMLElement

onabort

Type (this: GlobalEventHandlers, ev: UIEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user aborts the download.

onanimationcancel

Type (this: GlobalEventHandlers, ev: AnimationEvent) => any | nullInherited from GlobalEventHandlers

onanimationend

Type (this: GlobalEventHandlers, ev: AnimationEvent) => any | nullInherited from GlobalEventHandlers

onanimationiteration

Type (this: GlobalEventHandlers, ev: AnimationEvent) => any | nullInherited from GlobalEventHandlers

onanimationstart

Type (this: GlobalEventHandlers, ev: AnimationEvent) => any | nullInherited from GlobalEventHandlers

onauxclick

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

onblur

Type (this: GlobalEventHandlers, ev: FocusEvent) => any | nullInherited from GlobalEventHandlers

Fires when the object loses the input focus.

oncancel

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

oncanplay

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when playback is possible, but would require further buffering.

oncanplaythrough

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

onchange

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Fires when the contents of the object or selection have changed.

onclick

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user clicks the left mouse button on the object

onclose

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

oncontextmenu

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user clicks the right mouse button in the client area, opening the context menu.

oncopy

Type (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any | nullInherited from DocumentAndElementEventHandlers

oncuechange

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

oncut

Type (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any | nullInherited from DocumentAndElementEventHandlers

ondblclick

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user double-clicks the object.

ondrag

Type (this: GlobalEventHandlers, ev: DragEvent) => any | nullInherited from GlobalEventHandlers

Fires on the source object continuously during a drag operation.

ondragend

Type (this: GlobalEventHandlers, ev: DragEvent) => any | nullInherited from GlobalEventHandlers

Fires on the source object when the user releases the mouse at the close of a drag operation.

ondragenter

Type (this: GlobalEventHandlers, ev: DragEvent) => any | nullInherited from GlobalEventHandlers

Fires on the target element when the user drags the object to a valid drop target.

ondragexit

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

ondragleave

Type (this: GlobalEventHandlers, ev: DragEvent) => any | nullInherited from GlobalEventHandlers

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

ondragover

Type (this: GlobalEventHandlers, ev: DragEvent) => any | nullInherited from GlobalEventHandlers

Fires on the target element continuously while the user drags the object over a valid drop target.

ondragstart

Type (this: GlobalEventHandlers, ev: DragEvent) => any | nullInherited from GlobalEventHandlers

Fires on the source object when the user starts to drag a text selection or selected object.

ondrop

Type (this: GlobalEventHandlers, ev: DragEvent) => any | nullInherited from GlobalEventHandlers

ondurationchange

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the duration attribute is updated.

onemptied

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the media element is reset to its initial state.

onended

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the end of playback is reached.

onerror

Type OnErrorEventHandlerInherited from GlobalEventHandlers

Fires when an error occurs during object loading.

onfocus

Type (this: GlobalEventHandlers, ev: FocusEvent) => any | nullInherited from GlobalEventHandlers

Fires when the object receives focus.

onfullscreenchange

Type (this: Element, ev: Event) => any | nullInherited from Element

onfullscreenerror

Type (this: Element, ev: Event) => any | nullInherited from Element

ongotpointercapture

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

oninput

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

oninvalid

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

onkeydown

Type (this: GlobalEventHandlers, ev: KeyboardEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user presses a key.

onkeypress

Type (this: GlobalEventHandlers, ev: KeyboardEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user presses an alphanumeric key.

onkeyup

Type (this: GlobalEventHandlers, ev: KeyboardEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user releases a key.

onload

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Fires immediately after the browser loads the object.

onloadeddata

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when media data is loaded at the current playback position.

onloadedmetadata

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the duration and dimensions of the media have been determined.

onloadend

Type (this: GlobalEventHandlers, ev: ProgressEvent) => any | nullInherited from GlobalEventHandlers

onloadstart

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when Internet Explorer begins looking for media data.

onlostpointercapture

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onmousedown

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user clicks the object with either mouse button.

onmouseenter

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

onmouseleave

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

onmousemove

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user moves the mouse over the object.

onmouseout

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user moves the mouse pointer outside the boundaries of the object.

onmouseover

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user moves the mouse pointer into the object.

onmouseup

Type (this: GlobalEventHandlers, ev: MouseEvent) => any | nullInherited from GlobalEventHandlers

Fires when the user releases a mouse button while the mouse is over the object.

onpaste

Type (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any | nullInherited from DocumentAndElementEventHandlers

onpause

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when playback is paused.

onplay

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the play method is requested.

onplaying

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the audio or video has started playing.

onpointercancel

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onpointerdown

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onpointerenter

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onpointerleave

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onpointermove

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onpointerout

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onpointerover

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onpointerup

Type (this: GlobalEventHandlers, ev: PointerEvent) => any | nullInherited from GlobalEventHandlers

onprogress

Type (this: GlobalEventHandlers, ev: ProgressEvent) => any | nullInherited from GlobalEventHandlers

Occurs to indicate progress while downloading media data.

onratechange

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the playback rate is increased or decreased.

onreset

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Fires when the user resets a form.

onresize

Type (this: GlobalEventHandlers, ev: UIEvent) => any | nullInherited from GlobalEventHandlers

onscroll

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Fires when the user repositions the scroll box in the scroll bar on the object.

onsecuritypolicyviolation

Type (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | nullInherited from GlobalEventHandlers

onseeked

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the seek operation ends.

onseeking

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the current playback position is moved.

onselect

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Fires when the current selection changes.

onselectionchange

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

onselectstart

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

onstalled

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the download has stopped.

onsubmit

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

onsuspend

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs if the load operation has been intentionally halted.

ontimeupdate

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs to indicate the current playback position.

ontoggle

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

ontouchcancel

Type (this: GlobalEventHandlers, ev: TouchEvent) => any | nullInherited from GlobalEventHandlers

ontouchend

Type (this: GlobalEventHandlers, ev: TouchEvent) => any | nullInherited from GlobalEventHandlers

ontouchmove

Type (this: GlobalEventHandlers, ev: TouchEvent) => any | nullInherited from GlobalEventHandlers

ontouchstart

Type (this: GlobalEventHandlers, ev: TouchEvent) => any | nullInherited from GlobalEventHandlers

ontransitioncancel

Type (this: GlobalEventHandlers, ev: TransitionEvent) => any | nullInherited from GlobalEventHandlers

ontransitionend

Type (this: GlobalEventHandlers, ev: TransitionEvent) => any | nullInherited from GlobalEventHandlers

ontransitionrun

Type (this: GlobalEventHandlers, ev: TransitionEvent) => any | nullInherited from GlobalEventHandlers

ontransitionstart

Type (this: GlobalEventHandlers, ev: TransitionEvent) => any | nullInherited from GlobalEventHandlers

onvolumechange

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when the volume is changed, or playback is muted or unmuted.

onwaiting

Type (this: GlobalEventHandlers, ev: Event) => any | nullInherited from GlobalEventHandlers

Occurs when playback stops because the next frame of a video resource is not available.

onwheel

Type (this: GlobalEventHandlers, ev: WheelEvent) => any | nullInherited from GlobalEventHandlers

outerHTML

Type stringInherited from Element

ownerDocument

Type Document | nullInherited from Node

Returns the node document. Returns null for documents.

parentElement

Type HTMLElement | nullInherited from Node

Returns the parent element.

parentNode

Type Node & ParentNode | nullInherited from Node

Returns the parent.

prefix

Type string | nullInherited from Element

Returns the namespace prefix.

previousElementSibling

Type Element | nullInherited from NonDocumentTypeChildNode

Returns the first preceding sibling that is an element, and null otherwise.

previousSibling

Type Node | nullInherited from Node

Returns the previous sibling.

PROCESSING_INSTRUCTION_NODE

Type numberInherited from Node

node is a ProcessingInstruction node.

scrollHeight

Type numberInherited from Element

scrollLeft

Type numberInherited from Element

scrollTop

Type numberInherited from Element

scrollWidth

Type numberInherited from Element

shadowRoot

Type ShadowRoot | nullInherited from Element

Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise.

slot

Type stringInherited from Element

Returns the value of element's slot content attribute. Can be set to change it.

spellcheck

Type booleanInherited from HTMLElement

style

Type CSSStyleDeclarationInherited from ElementCSSInlineStyle

tabIndex

Type numberInherited from HTMLOrSVGElement

tagName

Type stringInherited from Element

Returns the HTML-uppercased qualified name.

TEXT_NODE

Type numberInherited from Node

node is a Text node.

textContent

Type string | nullInherited from Node

title

Type stringInherited from HTMLElement

translate

Type booleanInherited from HTMLElement

Methods

addEventListener(type: K,
listener: (this: ChartElement, event: IChartElementEventMap[""]) => any,
options?: boolean | AddEventListenerOptions
)

Returns void

removeEventListener(type: K,
listener: (this: ChartElement, event: IChartElementEventMap[""]) => any,
options?: boolean | EventListenerOptions
)

Returns void

whenReady()

Returns Promise

Returns a promise of the built chart. It resolves at once if the chart is already built, or once it is, and rejects if the build fails or the element is removed first. A new config makes a new chart and a new promise.

67 inherited items
after(nodes: string | Node[])

Returns voidInherited from ChildNode

Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.

Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null,
options?: number | KeyframeAnimationOptions
)

Returns AnimationInherited from Animatable

append(nodes: string | Node[])

Returns voidInherited from ParentNode

Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.

Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

appendChild(newChild: T)

Returns TInherited from Node

attachShadow(init: ShadowRootInit)

Returns ShadowRootInherited from Element

Creates a shadow root for element and returns it.

before(nodes: string | Node[])

Returns voidInherited from ChildNode

Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.

Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

blur()

Returns voidInherited from HTMLOrSVGElement

click()

Returns voidInherited from HTMLElement

cloneNode(deep?: undefined | false | true)

Returns NodeInherited from Node

Returns a copy of node. If deep is true, the copy also includes the node's descendants.

closest(selector: K)

Returns HTMLElementTagNameMap[""] | nullInherited from Element

Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.

compareDocumentPosition(other: Node)

Returns numberInherited from Node

Returns a bitmask indicating the position of other relative to node.

contains(other: Node | null)

Returns booleanInherited from Node

Returns true if other is an inclusive descendant of node, and false otherwise.

dispatchEvent(event: Event)

Returns booleanInherited from EventTarget

Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

focus(options?: FocusOptions)

Returns voidInherited from HTMLOrSVGElement

getAnimations()

Returns Animation[]Inherited from Animatable

getAttribute(qualifiedName: string)

Returns string | nullInherited from Element

Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.

getAttributeNames()

Returns string[]Inherited from Element

Returns the qualified names of all element's attributes. Can contain duplicates.

getAttributeNode(name: string)

Returns Attr | nullInherited from Element

getAttributeNodeNS(namespaceURI: string,
localName: string
)

Returns Attr | nullInherited from Element

getAttributeNS(namespace: string | null,
localName: string
)

Returns string | nullInherited from Element

Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.

getBoundingClientRect()

Returns DOMRectInherited from Element

getClientRects()

Returns DOMRectListInherited from Element

getElementsByClassName(classNames: string)

Returns HTMLCollectionOfInherited from Element

Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.

getElementsByTagName(qualifiedName: K)

Returns HTMLCollectionOfInherited from Element

getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml",
localName: string
)

Returns HTMLCollectionOfInherited from Element

getRootNode(options?: GetRootNodeOptions)

Returns NodeInherited from Node

Returns node's root.

hasAttribute(qualifiedName: string)

Returns booleanInherited from Element

Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.

hasAttributeNS(namespace: string | null,
localName: string
)

Returns booleanInherited from Element

Returns true if element has an attribute whose namespace is namespace and local name is localName.

hasAttributes()

Returns booleanInherited from Element

Returns true if element has attributes, and false otherwise.

hasChildNodes()

Returns booleanInherited from Node

Returns whether node has children.

hasPointerCapture(pointerId: number)

Returns booleanInherited from Element

insertAdjacentElement(position: InsertPosition,
insertedElement: Element
)

Returns Element | nullInherited from Element

insertAdjacentHTML(where: InsertPosition,
html: string
)

Returns voidInherited from Element

insertAdjacentText(where: InsertPosition,
text: string
)

Returns voidInherited from Element

insertBefore(newChild: T,
refChild: Node | null
)

Returns TInherited from Node

isDefaultNamespace(namespace: string | null)

Returns booleanInherited from Node

isEqualNode(otherNode: Node | null)

Returns booleanInherited from Node

Returns whether node and otherNode have the same properties.

isSameNode(otherNode: Node | null)

Returns booleanInherited from Node

lookupNamespaceURI(prefix: string | null)

Returns string | nullInherited from Node

lookupPrefix(namespace: string | null)

Returns string | nullInherited from Node

matches(selectors: string)

Returns booleanInherited from Element

Returns true if matching selectors against element's root yields element, and false otherwise.

msGetRegionContent()

Returns anyInherited from Element

normalize()

Returns voidInherited from Node

Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

prepend(nodes: string | Node[])

Returns voidInherited from ParentNode

Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.

Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

querySelector(selectors: K)

Returns HTMLElementTagNameMap[""] | nullInherited from ParentNode

Returns the first element that is a descendant of node that matches selectors.

querySelectorAll(selectors: K)

Returns NodeListOfInherited from ParentNode

Returns all element descendants of node that match selectors.

releasePointerCapture(pointerId: number)

Returns voidInherited from Element

remove()

Returns voidInherited from ChildNode

Removes node.

removeAttribute(qualifiedName: string)

Returns voidInherited from Element

Removes element's first attribute whose qualified name is qualifiedName.

removeAttributeNode(attr: Attr)

Returns AttrInherited from Element

removeAttributeNS(namespace: string | null,
localName: string
)

Returns voidInherited from Element

Removes element's attribute whose namespace is namespace and local name is localName.

removeChild(oldChild: T)

Returns TInherited from Node

replaceChild(newChild: Node,
oldChild: T
)

Returns TInherited from Node

replaceWith(nodes: string | Node[])

Returns voidInherited from ChildNode

Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.

Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

requestFullscreen(options?: FullscreenOptions)

Returns PromiseInherited from Element

Displays element fullscreen and resolves promise when done.

When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.

requestPointerLock()

Returns voidInherited from Element

scroll(options?: ScrollToOptions)

Returns voidInherited from Element

scrollBy(options?: ScrollToOptions)

Returns voidInherited from Element

scrollIntoView(arg?: boolean | ScrollIntoViewOptions)

Returns voidInherited from Element

scrollTo(options?: ScrollToOptions)

Returns voidInherited from Element

setAttribute(qualifiedName: string,
value: string
)

Returns voidInherited from Element

Sets the value of element's first attribute whose qualified name is qualifiedName to value.

setAttributeNode(attr: Attr)

Returns Attr | nullInherited from Element

setAttributeNodeNS(attr: Attr)

Returns Attr | nullInherited from Element

setAttributeNS(namespace: string | null,
qualifiedName: string,
value: string
)

Returns voidInherited from Element

Sets the value of element's attribute whose namespace is namespace and local name is localName to value.

setPointerCapture(pointerId: number)

Returns voidInherited from Element

toggleAttribute(qualifiedName: string,
force?: undefined | false | true
)

Returns booleanInherited from Element

If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.

Returns true if qualifiedName is now present, and false otherwise.

webkitMatchesSelector(selectors: string)

Returns booleanInherited from Element

Events

ChartElement does not have any events.