ChartElement

Type class

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 with the themes attribute (names, for the script version, where each theme is a global). renderer="svg" draws the chart as SVG.

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.

Click here for more information
Click here for the config format
@since 5.21.0

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
});
<!-- Load ChartElement -->
<script src="element.js"></script>

<script>
// Create ChartElement
am5element.ChartElement.new(root, {
  // ... config if applicable
});
</script>

Inheritance

ChartElement extends HTMLElement.

ChartElement is not extended by any other symbol.

Settings

ChartElement does not have any settings.

Private settings

ChartElement does not have any private settings.

Properties

ATTRIBUTE_NODE
#

Type number

Inherited from Node

CDATA_SECTION_NODE
#

Type number

Inherited from Node

node is a CDATASection node.

COMMENT_NODE
#

Type number

Inherited from Node

node is a Comment node.

DOCUMENT_FRAGMENT_NODE
#

Type number

Inherited from Node

node is a DocumentFragment node.

DOCUMENT_NODE
#

Type number

Inherited from Node

node is a document.

DOCUMENT_POSITION_CONTAINED_BY
#

Type number

Inherited from Node

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINS
#

Type number

Inherited from Node

Set when other is an ancestor of node.

DOCUMENT_POSITION_DISCONNECTED
#

Type number

Inherited from Node

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

DOCUMENT_POSITION_FOLLOWING
#

Type number

Inherited from Node

Set when other is following node.

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
#

Type number

Inherited from Node

DOCUMENT_POSITION_PRECEDING
#

Type number

Inherited from Node

Set when other is preceding node.

DOCUMENT_TYPE_NODE
#

Type number

Inherited from Node

node is a doctype.

ELEMENT_NODE
#

Type number

Inherited from Node

node is an element.

ENTITY_NODE
#

Type number

Inherited from Node

ENTITY_REFERENCE_NODE
#

Type number

Inherited from Node

HTMLElement
#

Static

Type { prototype: HTMLElement }

NOTATION_NODE
#

Type number

Inherited from Node

PROCESSING_INSTRUCTION_NODE
#

Type number

Inherited from Node

node is a ProcessingInstruction node.

TEXT_NODE
#

Type number

Inherited from Node

node is a Text node.

accessKey
#

Type string

Inherited from HTMLElement

accessKeyLabel
#

Type string

Inherited from HTMLElement

assignedSlot
#

Type HTMLSlotElement | null

Inherited from Element

attributes
#

Type NamedNodeMap

Inherited from Element

autocapitalize
#

Type string

Inherited from HTMLElement

baseURI
#

Type string

Inherited from Node

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

chart
#

Type Entity | undefined

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

childElementCount
#

Type number

Inherited from ParentNode

childNodes
#

Type NodeListOf

Inherited from Node

Returns the children.

children
#

Type HTMLCollection

Inherited from ParentNode

Returns the child elements.

classList
#

Type DOMTokenList

Inherited from Element

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

className
#

Type string

Inherited from Element

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

clientHeight
#

Type number

Inherited from Element

clientLeft
#

Type number

Inherited from Element

clientTop
#

Type number

Inherited from Element

clientWidth
#

Type number

Inherited from Element

config
#

Type object | string | undefined

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

contentEditable
#

Type string

Inherited from ElementContentEditable

dataset
#

Type DOMStringMap

Inherited from HTMLOrSVGElement

dir
#

Type string

Inherited from HTMLElement

draggable
#

Type boolean

Inherited from HTMLElement

firstChild
#

Type ChildNode | null

Inherited from Node

Returns the first child.

firstElementChild
#

Type Element | null

Inherited from ParentNode

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

hidden
#

Type boolean

Inherited from HTMLElement

id
#

Type string

Inherited from Element

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

innerHTML
#

Type string

Inherited from InnerHTML

innerText
#

Type string

Inherited from HTMLElement

inputMode
#

Type string

Inherited from ElementContentEditable

isConnected
#

Type boolean

Inherited from Node

Returns true if node is connected and false otherwise.

isContentEditable
#

Type boolean

Inherited from ElementContentEditable

lang
#

Type string

Inherited from HTMLElement

lastChild
#

Type ChildNode | null

Inherited from Node

Returns the last child.

lastElementChild
#

Type Element | null

Inherited from ParentNode

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

localName
#

Type string

Inherited from Element

Returns the local name.

namespaceURI
#

Type string | null

Inherited from Element

Returns the namespace.

nextElementSibling
#

Type Element | null

Inherited from NonDocumentTypeChildNode

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

nextSibling
#

Type ChildNode | null

Inherited from Node

Returns the next sibling.

nodeName
#

Type string

Inherited from Node

Returns a string appropriate for the type of node.

nodeType
#

Type number

Inherited from Node

Returns the type of node.

nodeValue
#

Type string | null

Inherited from Node

nonce
#

Type undefined | string

Inherited from HTMLOrSVGElement

offsetHeight
#

Type number

Inherited from HTMLElement

offsetLeft
#

Type number

Inherited from HTMLElement

offsetParent
#

Type Element | null

Inherited from HTMLElement

offsetTop
#

Type number

Inherited from HTMLElement

offsetWidth
#

Type number

Inherited from HTMLElement

onabort
#

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

Inherited from GlobalEventHandlers

Fires when the user aborts the download.

@param The event.

onanimationcancel
#

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

Inherited from GlobalEventHandlers

onanimationend
#

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

Inherited from GlobalEventHandlers

onanimationiteration
#

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

Inherited from GlobalEventHandlers

onanimationstart
#

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

Inherited from GlobalEventHandlers

onauxclick
#

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

Inherited from GlobalEventHandlers

onblur
#

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

Inherited from GlobalEventHandlers

Fires when the object loses the input focus.

@param The focus event.

oncancel
#

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

Inherited from GlobalEventHandlers

oncanplay
#

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

Inherited from GlobalEventHandlers

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

@param The event.

oncanplaythrough
#

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

Inherited from GlobalEventHandlers

onchange
#

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

Inherited from GlobalEventHandlers

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

@param The event.

onclick
#

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

Inherited from GlobalEventHandlers

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

@param The mouse event.

onclose
#

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

Inherited from GlobalEventHandlers

oncontextmenu
#

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

Inherited from GlobalEventHandlers

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

@param The mouse event.

oncopy
#

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

Inherited from DocumentAndElementEventHandlers

oncuechange
#

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

Inherited from GlobalEventHandlers

oncut
#

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

Inherited from DocumentAndElementEventHandlers

ondblclick
#

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

Inherited from GlobalEventHandlers

Fires when the user double-clicks the object.

@param The mouse event.

ondrag
#

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

Inherited from GlobalEventHandlers

Fires on the source object continuously during a drag operation.

@param The event.

ondragend
#

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

Inherited from GlobalEventHandlers

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

@param The event.

ondragenter
#

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

Inherited from GlobalEventHandlers

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

@param The drag event.

ondragexit
#

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

Inherited from GlobalEventHandlers

ondragleave
#

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

Inherited from GlobalEventHandlers

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

@param The drag event.

ondragover
#

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

Inherited from GlobalEventHandlers

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

@param The event.

ondragstart
#

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

Inherited from GlobalEventHandlers

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

@param The event.

ondrop
#

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

Inherited from GlobalEventHandlers

ondurationchange
#

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

Inherited from GlobalEventHandlers

Occurs when the duration attribute is updated.

@param The event.

onemptied
#

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

Inherited from GlobalEventHandlers

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

@param The event.

onended
#

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

Inherited from GlobalEventHandlers

Occurs when the end of playback is reached.

@param The event

onerror
#

Type OnErrorEventHandler

Inherited from GlobalEventHandlers

Fires when an error occurs during object loading.

@param The event.

onfocus
#

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

Inherited from GlobalEventHandlers

Fires when the object receives focus.

@param The event.

onfullscreenchange
#

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

Inherited from Element

onfullscreenerror
#

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

Inherited from Element

ongotpointercapture
#

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

Inherited from GlobalEventHandlers

oninput
#

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

Inherited from GlobalEventHandlers

oninvalid
#

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

Inherited from GlobalEventHandlers

onkeydown
#

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

Inherited from GlobalEventHandlers

Fires when the user presses a key.

@param The keyboard event

onkeypress
#

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

Inherited from GlobalEventHandlers

Fires when the user presses an alphanumeric key.

@param The event.

onkeyup
#

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

Inherited from GlobalEventHandlers

Fires when the user releases a key.

@param The keyboard event

onload
#

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

Inherited from GlobalEventHandlers

Fires immediately after the browser loads the object.

@param The event.

onloadeddata
#

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

Inherited from GlobalEventHandlers

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

@param The event.

onloadedmetadata
#

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

Inherited from GlobalEventHandlers

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

@param The event.

onloadend
#

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

Inherited from GlobalEventHandlers

onloadstart
#

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

Inherited from GlobalEventHandlers

Occurs when Internet Explorer begins looking for media data.

@param The event.

onlostpointercapture
#

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

Inherited from GlobalEventHandlers

onmousedown
#

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

Inherited from GlobalEventHandlers

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

@param The mouse event.

onmouseenter
#

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

Inherited from GlobalEventHandlers

onmouseleave
#

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

Inherited from GlobalEventHandlers

onmousemove
#

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

Inherited from GlobalEventHandlers

Fires when the user moves the mouse over the object.

@param The mouse event.

onmouseout
#

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

Inherited from GlobalEventHandlers

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

@param The mouse event.

onmouseover
#

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

Inherited from GlobalEventHandlers

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

@param The mouse event.

onmouseup
#

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

Inherited from GlobalEventHandlers

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

@param The mouse event.

onpaste
#

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

Inherited from DocumentAndElementEventHandlers

onpause
#

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

Inherited from GlobalEventHandlers

Occurs when playback is paused.

@param The event.

onplay
#

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

Inherited from GlobalEventHandlers

Occurs when the play method is requested.

@param The event.

onplaying
#

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

Inherited from GlobalEventHandlers

Occurs when the audio or video has started playing.

@param The event.

onpointercancel
#

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

Inherited from GlobalEventHandlers

onpointerdown
#

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

Inherited from GlobalEventHandlers

onpointerenter
#

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

Inherited from GlobalEventHandlers

onpointerleave
#

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

Inherited from GlobalEventHandlers

onpointermove
#

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

Inherited from GlobalEventHandlers

onpointerout
#

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

Inherited from GlobalEventHandlers

onpointerover
#

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

Inherited from GlobalEventHandlers

onpointerup
#

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

Inherited from GlobalEventHandlers

onprogress
#

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

Inherited from GlobalEventHandlers

Occurs to indicate progress while downloading media data.

@param The event.

onratechange
#

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

Inherited from GlobalEventHandlers

Occurs when the playback rate is increased or decreased.

@param The event.

onreset
#

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

Inherited from GlobalEventHandlers

Fires when the user resets a form.

@param The event.

onresize
#

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

Inherited from GlobalEventHandlers

onscroll
#

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

Inherited from GlobalEventHandlers

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

@param The event.

onsecuritypolicyviolation
#

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

Inherited from GlobalEventHandlers

onseeked
#

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

Inherited from GlobalEventHandlers

Occurs when the seek operation ends.

@param The event.

onseeking
#

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

Inherited from GlobalEventHandlers

Occurs when the current playback position is moved.

@param The event.

onselect
#

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

Inherited from GlobalEventHandlers

Fires when the current selection changes.

@param The event.

onselectionchange
#

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

Inherited from GlobalEventHandlers

onselectstart
#

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

Inherited from GlobalEventHandlers

onstalled
#

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

Inherited from GlobalEventHandlers

Occurs when the download has stopped.

@param The event.

onsubmit
#

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

Inherited from GlobalEventHandlers

onsuspend
#

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

Inherited from GlobalEventHandlers

Occurs if the load operation has been intentionally halted.

@param The event.

ontimeupdate
#

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

Inherited from GlobalEventHandlers

Occurs to indicate the current playback position.

@param The event.

ontoggle
#

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

Inherited from GlobalEventHandlers

ontouchcancel
#

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

Inherited from GlobalEventHandlers

ontouchend
#

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

Inherited from GlobalEventHandlers

ontouchmove
#

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

Inherited from GlobalEventHandlers

ontouchstart
#

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

Inherited from GlobalEventHandlers

ontransitioncancel
#

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

Inherited from GlobalEventHandlers

ontransitionend
#

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

Inherited from GlobalEventHandlers

ontransitionrun
#

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

Inherited from GlobalEventHandlers

ontransitionstart
#

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

Inherited from GlobalEventHandlers

onvolumechange
#

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

Inherited from GlobalEventHandlers

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

@param The event.

onwaiting
#

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

Inherited from GlobalEventHandlers

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

@param The event.

onwheel
#

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

Inherited from GlobalEventHandlers

outerHTML
#

Type string

Inherited from Element

ownerDocument
#

Type Document | null

Inherited from Node

Returns the node document. Returns null for documents.

parentElement
#

Type HTMLElement | null

Inherited from Node

Returns the parent element.

parentNode
#

Type Node & ParentNode | null

Inherited from Node

Returns the parent.

prefix
#

Type string | null

Inherited from Element

Returns the namespace prefix.

previousElementSibling
#

Type Element | null

Inherited from NonDocumentTypeChildNode

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

previousSibling
#

Type Node | null

Inherited from Node

Returns the previous sibling.

root
#

Type Root | undefined

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

scrollHeight
#

Type number

Inherited from Element

scrollLeft
#

Type number

Inherited from Element

scrollTop
#

Type number

Inherited from Element

scrollWidth
#

Type number

Inherited from Element

shadowRoot
#

Type ShadowRoot | null

Inherited from Element

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

slot
#

Type string

Inherited from Element

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

spellcheck
#

Type boolean

Inherited from HTMLElement

style
#

Type CSSStyleDeclaration

Inherited from ElementCSSInlineStyle

tabIndex
#

Type number

Inherited from HTMLOrSVGElement

tagName
#

Type string

Inherited from Element

Returns the HTML-uppercased qualified name.

textContent
#

Type string | null

Inherited from Node

themes
#

Type Array | undefined

Themes for the chart, as theme classes, e.g. [am5themes_Animated].

Setting them builds the chart again.

title
#

Type string

Inherited from HTMLElement

translate
#

Type boolean

Inherited from HTMLElement

There are 173 inherited items currently hidden from this list.

Methods

addEventListener(

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

)

#

Returns void

after(

nodes: string | Node

)

#

Returns void

Inherited 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 Animation

Inherited from Animatable

append(

nodes: string | Node

)

#

Returns void

Inherited 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 T

Inherited from Node

attachShadow(

init: ShadowRootInit

)

#

Returns ShadowRoot

Inherited from Element

Creates a shadow root for element and returns it.

before(

nodes: string | Node

)

#

Returns void

Inherited 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 void

Inherited from HTMLOrSVGElement

click()

#

Returns void

Inherited from HTMLElement

cloneNode(

deep?: undefined | false | true

)

#

Returns Node

Inherited from Node

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

closest(

selector: K

)

#

Returns void

Inherited from Element

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

compareDocumentPosition(

other: Node

)

#

Returns number

Inherited from Node

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

contains(

other: Node | null

)

#

Returns boolean

Inherited from Node

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

dispatchEvent(

event: Event

)

#

Returns boolean

Inherited 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 void

Inherited from HTMLOrSVGElement

getAnimations()

#

Returns void

Inherited from Animatable

getAttribute(

qualifiedName: string

)

#

Returns void

Inherited from Element

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

getAttributeNS(

namespace: string | null,
localName: string

)

#

Returns void

Inherited from Element

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

getAttributeNames()

#

Returns void

Inherited from Element

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

getAttributeNode(

name: string

)

#

Returns void

Inherited from Element

getAttributeNodeNS(

namespaceURI: string,
localName: string

)

#

Returns void

Inherited from Element

getBoundingClientRect()

#

Returns DOMRect

Inherited from Element

getClientRects()

#

Returns DOMRectList

Inherited from Element

getElementsByClassName(

classNames: string

)

#

Returns HTMLCollectionOf

Inherited 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 HTMLCollectionOf

Inherited from Element

getElementsByTagNameNS(

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

)

#

Returns HTMLCollectionOf

Inherited from Element

getRootNode(

options?: GetRootNodeOptions

)

#

Returns Node

Inherited from Node

Returns node's root.

hasAttribute(

qualifiedName: string

)

#

Returns boolean

Inherited from Element

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

hasAttributeNS(

namespace: string | null,
localName: string

)

#

Returns boolean

Inherited from Element

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

hasAttributes()

#

Returns boolean

Inherited from Element

Returns true if element has attributes, and false otherwise.

hasChildNodes()

#

Returns boolean

Inherited from Node

Returns whether node has children.

hasPointerCapture(

pointerId: number

)

#

Returns boolean

Inherited from Element

insertAdjacentElement(

position: InsertPosition,
insertedElement: Element

)

#

Returns void

Inherited from Element

insertAdjacentHTML(

where: InsertPosition,
html: string

)

#

Returns void

Inherited from Element

insertAdjacentText(

where: InsertPosition,
text: string

)

#

Returns void

Inherited from Element

insertBefore(

newChild: T,
refChild: Node | null

)

#

Returns T

Inherited from Node

isDefaultNamespace(

namespace: string | null

)

#

Returns boolean

Inherited from Node

isEqualNode(

otherNode: Node | null

)

#

Returns boolean

Inherited from Node

Returns whether node and otherNode have the same properties.

isSameNode(

otherNode: Node | null

)

#

Returns boolean

Inherited from Node

lookupNamespaceURI(

prefix: string | null

)

#

Returns void

Inherited from Node

lookupPrefix(

namespace: string | null

)

#

Returns void

Inherited from Node

matches(

selectors: string

)

#

Returns boolean

Inherited from Element

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

msGetRegionContent()

#

Returns any

Inherited from Element

normalize()

#

Returns void

Inherited 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 void

Inherited 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 void

Inherited from ParentNode

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

querySelectorAll(

selectors: K

)

#

Returns NodeListOf

Inherited from ParentNode

Returns all element descendants of node that match selectors.

releasePointerCapture(

pointerId: number

)

#

Returns void

Inherited from Element

remove()

#

Returns void

Inherited from ChildNode

Removes node.

removeAttribute(

qualifiedName: string

)

#

Returns void

Inherited from Element

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

removeAttributeNS(

namespace: string | null,
localName: string

)

#

Returns void

Inherited from Element

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

removeAttributeNode(

attr: Attr

)

#

Returns Attr

Inherited from Element

removeChild(

oldChild: T

)

#

Returns T

Inherited from Node

removeEventListener(

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

)

#

Returns void

replaceChild(

newChild: Node,
oldChild: T

)

#

Returns T

Inherited from Node

replaceWith(

nodes: string | Node

)

#

Returns void

Inherited 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 Promise

Inherited 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 void

Inherited from Element

scroll(

options?: ScrollToOptions

)

#

Returns void

Inherited from Element

scrollBy(

options?: ScrollToOptions

)

#

Returns void

Inherited from Element

scrollIntoView(

arg?: boolean | ScrollIntoViewOptions

)

#

Returns void

Inherited from Element

scrollTo(

options?: ScrollToOptions

)

#

Returns void

Inherited from Element

setAttribute(

qualifiedName: string,
value: string

)

#

Returns void

Inherited from Element

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

setAttributeNS(

namespace: string | null,
qualifiedName: string,
value: string

)

#

Returns void

Inherited from Element

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

setAttributeNode(

attr: Attr

)

#

Returns void

Inherited from Element

setAttributeNodeNS(

attr: Attr

)

#

Returns void

Inherited from Element

setPointerCapture(

pointerId: number

)

#

Returns void

Inherited from Element

toggleAttribute(

qualifiedName: string,
force?: undefined | false | true

)

#

Returns boolean

Inherited 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 boolean

Inherited from Element

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.

There are 67 inherited items currently hidden from this list.

Events

ChartElement does not have any events.