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
More info: Serializing / JSON config for the config format
Sources
ChartElement can be used (imported) via one of the following packages.
// Import ChartElementimport * as am5element from "@amcharts/amcharts5/element";
// Create ChartElementam5element.ChartElement.new(root, { // ... config if applicable});<!-- Load ChartElement --><script src="element.js"></script>
<script>// Create ChartElementam5element.ChartElement.new(root, { // ... config if applicable});</script>Inheritance
ChartElement extends HTMLElement.
ChartElement is not extended by any other symbol.
Properties
chartType
Entity|undefinedWhat the config built, usually the chart, once it is built.
configType
object|string|undefinedThe chart's JSON config: an object, or a JSON string. Setting it builds the chart again.
HTMLElementStaticType { prototype:
HTMLElement}resourcesType
object|undefinedSince 5.21.4Objects 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.
rootType
Root|undefinedThe chart's root element, once it is built.
themesType
Array|undefinedThemes 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
accessKeyType
stringInherited fromHTMLElementaccessKeyLabelType
stringInherited fromHTMLElementassignedSlotType
HTMLSlotElement|nullInherited fromElementATTRIBUTE_NODEType
numberInherited fromNodeattributesType
NamedNodeMapInherited fromElementautocapitalizeType
stringInherited fromHTMLElementbaseURIType
stringInherited fromNodeReturns node's node document's document base URL.
CDATA_SECTION_NODEType
numberInherited fromNodenode is a CDATASection node.
childElementCountType
numberInherited fromParentNodechildNodesType
NodeListOfInherited fromNodeReturns the children.
childrenType
HTMLCollectionInherited fromParentNodeReturns the child elements.
classListType
DOMTokenListInherited fromElementAllows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.
classNameType
stringInherited fromElementReturns the value of element's class content attribute. Can be set to change it.
clientHeightType
numberInherited fromElementclientLeftType
numberInherited fromElementclientTopType
numberInherited fromElementclientWidthType
numberInherited fromElementCOMMENT_NODEType
numberInherited fromNodenode is a Comment node.
contentEditableType
stringInherited fromElementContentEditabledatasetType
DOMStringMapInherited fromHTMLOrSVGElementdirType
stringInherited fromHTMLElementDOCUMENT_FRAGMENT_NODEType
numberInherited fromNodenode is a DocumentFragment node.
DOCUMENT_NODEType
numberInherited fromNodenode is a document.
DOCUMENT_POSITION_CONTAINED_BYType
numberInherited fromNodeSet when other is a descendant of node.
DOCUMENT_POSITION_CONTAINSType
numberInherited fromNodeSet when other is an ancestor of node.
DOCUMENT_POSITION_DISCONNECTEDType
numberInherited fromNodeSet when node and other are not in the same tree.
DOCUMENT_POSITION_FOLLOWINGType
numberInherited fromNodeSet when other is following node.
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFICType
numberInherited fromNodeDOCUMENT_POSITION_PRECEDINGType
numberInherited fromNodeSet when other is preceding node.
DOCUMENT_TYPE_NODEType
numberInherited fromNodenode is a doctype.
draggableType
booleanInherited fromHTMLElementELEMENT_NODEType
numberInherited fromNodenode is an element.
ENTITY_NODEType
numberInherited fromNodeENTITY_REFERENCE_NODEType
numberInherited fromNodefirstChildType
ChildNode|nullInherited fromNodeReturns the first child.
firstElementChildType
Element|nullInherited fromParentNodeReturns the first child that is an element, and null otherwise.
Type
booleanInherited fromHTMLElementidType
stringInherited fromElementReturns the value of element's id content attribute. Can be set to change it.
innerHTMLType
stringInherited fromInnerHTMLinnerTextType
stringInherited fromHTMLElementinputModeType
stringInherited fromElementContentEditableisConnectedType
booleanInherited fromNodeReturns true if node is connected and false otherwise.
isContentEditableType
booleanInherited fromElementContentEditablelangType
stringInherited fromHTMLElementlastChildType
ChildNode|nullInherited fromNodeReturns the last child.
lastElementChildType
Element|nullInherited fromParentNodeReturns the last child that is an element, and null otherwise.
localNameType
stringInherited fromElementReturns the local name.
namespaceURIType
string|nullInherited fromElementReturns the namespace.
nextElementSiblingType
Element|nullInherited fromNonDocumentTypeChildNodeReturns the first following sibling that is an element, and null otherwise.
nextSiblingType
ChildNode|nullInherited fromNodeReturns the next sibling.
nodeNameType
stringInherited fromNodeReturns a string appropriate for the type of node.
nodeTypeType
numberInherited fromNodeReturns the type of node.
nodeValueType
string|nullInherited fromNodenonceType
undefined|stringInherited fromHTMLOrSVGElementNOTATION_NODEType
numberInherited fromNodeoffsetHeightType
numberInherited fromHTMLElementoffsetLeftType
numberInherited fromHTMLElementoffsetParentType
Element|nullInherited fromHTMLElementoffsetTopType
numberInherited fromHTMLElementoffsetWidthType
numberInherited fromHTMLElementonabortType (this:
GlobalEventHandlers, ev:UIEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user aborts the download.
onanimationcancelType (this:
GlobalEventHandlers, ev:AnimationEvent) =>any|nullInherited fromGlobalEventHandlersonanimationendType (this:
GlobalEventHandlers, ev:AnimationEvent) =>any|nullInherited fromGlobalEventHandlersonanimationiterationType (this:
GlobalEventHandlers, ev:AnimationEvent) =>any|nullInherited fromGlobalEventHandlersonanimationstartType (this:
GlobalEventHandlers, ev:AnimationEvent) =>any|nullInherited fromGlobalEventHandlersonauxclickType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersonblurType (this:
GlobalEventHandlers, ev:FocusEvent) =>any|nullInherited fromGlobalEventHandlersFires when the object loses the input focus.
oncancelType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersoncanplayType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when playback is possible, but would require further buffering.
oncanplaythroughType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersonchangeType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersFires when the contents of the object or selection have changed.
onclickType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user clicks the left mouse button on the object
oncloseType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user clicks the right mouse button in the client area, opening the context menu.
oncopyType (this:
DocumentAndElementEventHandlers, ev:ClipboardEvent) =>any|nullInherited fromDocumentAndElementEventHandlersoncuechangeType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersoncutType (this:
DocumentAndElementEventHandlers, ev:ClipboardEvent) =>any|nullInherited fromDocumentAndElementEventHandlersondblclickType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user double-clicks the object.
ondragType (this:
GlobalEventHandlers, ev:DragEvent) =>any|nullInherited fromGlobalEventHandlersFires on the source object continuously during a drag operation.
ondragendType (this:
GlobalEventHandlers, ev:DragEvent) =>any|nullInherited fromGlobalEventHandlersFires on the source object when the user releases the mouse at the close of a drag operation.
ondragenterType (this:
GlobalEventHandlers, ev:DragEvent) =>any|nullInherited fromGlobalEventHandlersFires on the target element when the user drags the object to a valid drop target.
ondragexitType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersondragleaveType (this:
GlobalEventHandlers, ev:DragEvent) =>any|nullInherited fromGlobalEventHandlersFires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
ondragoverType (this:
GlobalEventHandlers, ev:DragEvent) =>any|nullInherited fromGlobalEventHandlersFires on the target element continuously while the user drags the object over a valid drop target.
ondragstartType (this:
GlobalEventHandlers, ev:DragEvent) =>any|nullInherited fromGlobalEventHandlersFires on the source object when the user starts to drag a text selection or selected object.
ondropType (this:
GlobalEventHandlers, ev:DragEvent) =>any|nullInherited fromGlobalEventHandlersondurationchangeType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the duration attribute is updated.
onemptiedType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the media element is reset to its initial state.
onendedType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the end of playback is reached.
onerrorType
OnErrorEventHandlerInherited fromGlobalEventHandlersFires when an error occurs during object loading.
onfocusType (this:
GlobalEventHandlers, ev:FocusEvent) =>any|nullInherited fromGlobalEventHandlersFires when the object receives focus.
onfullscreenchangeType (this:
Element, ev:Event) =>any|nullInherited fromElementonfullscreenerrorType (this:
Element, ev:Event) =>any|nullInherited fromElementongotpointercaptureType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersoninputType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersoninvalidType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersonkeydownType (this:
GlobalEventHandlers, ev:KeyboardEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user presses a key.
onkeypressType (this:
GlobalEventHandlers, ev:KeyboardEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user presses an alphanumeric key.
onkeyupType (this:
GlobalEventHandlers, ev:KeyboardEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user releases a key.
onloadType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersFires immediately after the browser loads the object.
onloadeddataType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when media data is loaded at the current playback position.
onloadedmetadataType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the duration and dimensions of the media have been determined.
onloadendType (this:
GlobalEventHandlers, ev:ProgressEvent) =>any|nullInherited fromGlobalEventHandlersonloadstartType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when Internet Explorer begins looking for media data.
onlostpointercaptureType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonmousedownType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user clicks the object with either mouse button.
onmouseenterType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersonmouseleaveType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersonmousemoveType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user moves the mouse over the object.
onmouseoutType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user moves the mouse pointer outside the boundaries of the object.
onmouseoverType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user moves the mouse pointer into the object.
onmouseupType (this:
GlobalEventHandlers, ev:MouseEvent) =>any|nullInherited fromGlobalEventHandlersFires when the user releases a mouse button while the mouse is over the object.
onpasteType (this:
DocumentAndElementEventHandlers, ev:ClipboardEvent) =>any|nullInherited fromDocumentAndElementEventHandlersonpauseType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when playback is paused.
onplayType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the play method is requested.
onplayingType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the audio or video has started playing.
onpointercancelType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonpointerdownType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonpointerenterType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonpointerleaveType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonpointermoveType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonpointeroutType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonpointeroverType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonpointerupType (this:
GlobalEventHandlers, ev:PointerEvent) =>any|nullInherited fromGlobalEventHandlersonprogressType (this:
GlobalEventHandlers, ev:ProgressEvent) =>any|nullInherited fromGlobalEventHandlersOccurs to indicate progress while downloading media data.
onratechangeType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the playback rate is increased or decreased.
onresetType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersFires when the user resets a form.
onresizeType (this:
GlobalEventHandlers, ev:UIEvent) =>any|nullInherited fromGlobalEventHandlersonscrollType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersFires when the user repositions the scroll box in the scroll bar on the object.
onsecuritypolicyviolationType (this:
GlobalEventHandlers, ev:SecurityPolicyViolationEvent) =>any|nullInherited fromGlobalEventHandlersonseekedType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the seek operation ends.
onseekingType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the current playback position is moved.
onselectType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersFires when the current selection changes.
onselectionchangeType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersonselectstartType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersonstalledType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the download has stopped.
onsubmitType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersonsuspendType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs if the load operation has been intentionally halted.
ontimeupdateType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs to indicate the current playback position.
ontoggleType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersontouchcancelType (this:
GlobalEventHandlers, ev:TouchEvent) =>any|nullInherited fromGlobalEventHandlersontouchendType (this:
GlobalEventHandlers, ev:TouchEvent) =>any|nullInherited fromGlobalEventHandlersontouchmoveType (this:
GlobalEventHandlers, ev:TouchEvent) =>any|nullInherited fromGlobalEventHandlersontouchstartType (this:
GlobalEventHandlers, ev:TouchEvent) =>any|nullInherited fromGlobalEventHandlersontransitioncancelType (this:
GlobalEventHandlers, ev:TransitionEvent) =>any|nullInherited fromGlobalEventHandlersontransitionendType (this:
GlobalEventHandlers, ev:TransitionEvent) =>any|nullInherited fromGlobalEventHandlersontransitionrunType (this:
GlobalEventHandlers, ev:TransitionEvent) =>any|nullInherited fromGlobalEventHandlersontransitionstartType (this:
GlobalEventHandlers, ev:TransitionEvent) =>any|nullInherited fromGlobalEventHandlersonvolumechangeType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when the volume is changed, or playback is muted or unmuted.
onwaitingType (this:
GlobalEventHandlers, ev:Event) =>any|nullInherited fromGlobalEventHandlersOccurs when playback stops because the next frame of a video resource is not available.
onwheelType (this:
GlobalEventHandlers, ev:WheelEvent) =>any|nullInherited fromGlobalEventHandlersouterHTMLType
stringInherited fromElementownerDocumentType
Document|nullInherited fromNodeReturns the node document. Returns null for documents.
parentElementType
HTMLElement|nullInherited fromNodeReturns the parent element.
parentNodeType
Node&ParentNode|nullInherited fromNodeReturns the parent.
prefixType
string|nullInherited fromElementReturns the namespace prefix.
previousElementSiblingType
Element|nullInherited fromNonDocumentTypeChildNodeReturns the first preceding sibling that is an element, and null otherwise.
previousSiblingType
Node|nullInherited fromNodeReturns the previous sibling.
PROCESSING_INSTRUCTION_NODEType
numberInherited fromNodenode is a ProcessingInstruction node.
scrollHeightType
numberInherited fromElementscrollLeftType
numberInherited fromElementscrollTopType
numberInherited fromElementscrollWidthType
numberInherited fromElementshadowRootType
ShadowRoot|nullInherited fromElementReturns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise.
slotType
stringInherited fromElementReturns the value of element's slot content attribute. Can be set to change it.
spellcheckType
booleanInherited fromHTMLElementstyleType
CSSStyleDeclarationInherited fromElementCSSInlineStyletabIndexType
numberInherited fromHTMLOrSVGElementtagNameType
stringInherited fromElementReturns the HTML-uppercased qualified name.
TEXT_NODEType
numberInherited fromNodenode is a Text node.
textContentType
string|nullInherited fromNodetitleType
stringInherited fromHTMLElementtranslateType
booleanInherited fromHTMLElement
Methods
addEventListener(type:K,
listener: (this:ChartElement, event:IChartElementEventMap[""]) =>any,
options?:boolean|AddEventListenerOptions)Returns
voidremoveEventListener(type:K,
listener: (this:ChartElement, event:IChartElementEventMap[""]) =>any,
options?:boolean|EventListenerOptions)Returns
voidwhenReady()Returns
PromiseReturns 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 fromChildNodeInserts 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 fromAnimatableappend(nodes:string|Node[])Returns
voidInherited fromParentNodeInserts 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 fromNodeattachShadow(init:ShadowRootInit)Returns
ShadowRootInherited fromElementCreates a shadow root for element and returns it.
before(nodes:string|Node[])Returns
voidInherited fromChildNodeInserts 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 fromHTMLOrSVGElementclick()Returns
voidInherited fromHTMLElementcloneNode(deep?:undefined|false|true)Returns
NodeInherited fromNodeReturns a copy of node. If deep is true, the copy also includes the node's descendants.
closest(selector:K)Returns
HTMLElementTagNameMap[""]|nullInherited fromElementReturns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
compareDocumentPosition(other:Node)Returns
numberInherited fromNodeReturns a bitmask indicating the position of other relative to node.
contains(other:Node|null)Returns
booleanInherited fromNodeReturns true if other is an inclusive descendant of node, and false otherwise.
dispatchEvent(event:Event)Returns
booleanInherited fromEventTargetDispatches 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 fromHTMLOrSVGElementgetAnimations()Returns
Animation[]Inherited fromAnimatablegetAttribute(qualifiedName:string)Returns
string|nullInherited fromElementReturns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
getAttributeNames()Returns
string[]Inherited fromElementReturns the qualified names of all element's attributes. Can contain duplicates.
getAttributeNode(name:string)Returns
Attr|nullInherited fromElementgetAttributeNodeNS(namespaceURI:string,
localName:string)Returns
Attr|nullInherited fromElementgetAttributeNS(namespace:string|null,
localName:string)Returns
string|nullInherited fromElementReturns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.
getBoundingClientRect()Returns
DOMRectInherited fromElementgetClientRects()Returns
DOMRectListInherited fromElementgetElementsByClassName(classNames:string)Returns
HTMLCollectionOfInherited fromElementReturns 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 fromElementgetElementsByTagNameNS(namespaceURI:"http://www.w3.org/1999/xhtml",
localName:string)Returns
HTMLCollectionOfInherited fromElementgetRootNode(options?:GetRootNodeOptions)Returns
NodeInherited fromNodeReturns node's root.
hasAttribute(qualifiedName:string)Returns
booleanInherited fromElementReturns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
hasAttributeNS(namespace:string|null,
localName:string)Returns
booleanInherited fromElementReturns true if element has an attribute whose namespace is namespace and local name is localName.
hasAttributes()Returns
booleanInherited fromElementReturns true if element has attributes, and false otherwise.
hasChildNodes()Returns
booleanInherited fromNodeReturns whether node has children.
hasPointerCapture(pointerId:number)Returns
booleanInherited fromElementinsertAdjacentElement(position:InsertPosition,
insertedElement:Element)Returns
Element|nullInherited fromElementinsertAdjacentHTML(where:InsertPosition,
html:string)Returns
voidInherited fromElementinsertAdjacentText(where:InsertPosition,
text:string)Returns
voidInherited fromElementinsertBefore(newChild:T,
refChild:Node|null)Returns
TInherited fromNodeisDefaultNamespace(namespace:string|null)Returns
booleanInherited fromNodeisEqualNode(otherNode:Node|null)Returns
booleanInherited fromNodeReturns whether node and otherNode have the same properties.
isSameNode(otherNode:Node|null)Returns
booleanInherited fromNodelookupNamespaceURI(prefix:string|null)Returns
string|nullInherited fromNodelookupPrefix(namespace:string|null)Returns
string|nullInherited fromNodematches(selectors:string)Returns
booleanInherited fromElementReturns true if matching selectors against element's root yields element, and false otherwise.
msGetRegionContent()Returns
anyInherited fromElementnormalize()Returns
voidInherited fromNodeRemoves 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 fromParentNodeInserts 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 fromParentNodeReturns the first element that is a descendant of node that matches selectors.
querySelectorAll(selectors:K)Returns
NodeListOfInherited fromParentNodeReturns all element descendants of node that match selectors.
releasePointerCapture(pointerId:number)Returns
voidInherited fromElementremove()Returns
voidInherited fromChildNodeRemoves node.
removeAttribute(qualifiedName:string)Returns
voidInherited fromElementRemoves element's first attribute whose qualified name is qualifiedName.
removeAttributeNode(attr:Attr)Returns
AttrInherited fromElementremoveAttributeNS(namespace:string|null,
localName:string)Returns
voidInherited fromElementRemoves element's attribute whose namespace is namespace and local name is localName.
removeChild(oldChild:T)Returns
TInherited fromNodereplaceChild(newChild:Node,
oldChild:T)Returns
TInherited fromNodereplaceWith(nodes:string|Node[])Returns
voidInherited fromChildNodeReplaces 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 fromElementDisplays 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 fromElementscroll(options?:ScrollToOptions)Returns
voidInherited fromElementscrollBy(options?:ScrollToOptions)Returns
voidInherited fromElementscrollIntoView(arg?:boolean|ScrollIntoViewOptions)Returns
voidInherited fromElementscrollTo(options?:ScrollToOptions)Returns
voidInherited fromElementsetAttribute(qualifiedName:string,
value:string)Returns
voidInherited fromElementSets the value of element's first attribute whose qualified name is qualifiedName to value.
setAttributeNode(attr:Attr)Returns
Attr|nullInherited fromElementsetAttributeNodeNS(attr:Attr)Returns
Attr|nullInherited fromElementsetAttributeNS(namespace:string|null,
qualifiedName:string,
value:string)Returns
voidInherited fromElementSets the value of element's attribute whose namespace is namespace and local name is localName to value.
setPointerCapture(pointerId:number)Returns
voidInherited fromElementtoggleAttribute(qualifiedName:string,
force?:undefined|false|true)Returns
booleanInherited fromElementIf 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 fromElement
Events
ChartElement does not have any events.