Paper
Type class
Paper class which when instantiated will create an SVG element as well as some of the sub-elements like <desc>, <defs>.
Use its methods like addGroup and append to add elements to the paper.
Sources
Paper can be used (imported) via one of the following packages.
/** * Import from: "core.ts" * Use like: am4core.Paper */import * as am4core from "@amcharts/amcharts4/core";/** * Include via: <script src="core.js"></script> * Access items like: am4core.Paper */Inheritance
Paper does not extend any other symbol.
Paper is not extended by any other symbol.
Properties
containerType
HTMLElementA reference to the HTML container the
<svg>element is placed in.defsType
SVGDefsElementA reference to the
<defs>element.idType
stringAn id of the element.
svgType
SVGSVGElementA reference
<svg>element.
Methods
add(elementName:SVGElementNames)Returns
AMElementCreates and returns a new element. Does not attach it to Paper yet.
addGroup(groupName:SVGElementNames)Returns
GroupCreates and returns a new Group element. Does not attach it to Paper.
append(element:AMElement)Returns
voidAppends an element to Paper.
appendDef(element:AMElement)Returns
voidAppends an element to
<defs>block of the Paper.constructor(container:HTMLElement,
id:string)Returns
PaperCreates main
<svg>container and related elements.foreignObject()Returns
AMElementCreates and returns new
<foreignObject>element. Does not append it to Paper.supportsForeignObject()Returns
booleanChecks if browser supports
<foreignObject>elements.
Events
Paper does not have any events.