Constructor
Root.new()
Creates a new Root instance.ID of the target HTML element or the element itself
Root configuration settings
New Root instance
Properties
dom
Reference to original chart container (div element)
container
Main content container for the chart
tooltipContainer
Container used to display tooltips
locale
Locale used by the chart
utc
Use UTC when formatting date/time
timezone
If set, will format date/time in specific time zone (e.g. “America/Vancouver”, “Australia/Sydney”, “UTC”)
fps
Maximum FPS that the Root will run at. If
undefined it will run at the highest FPS.numberFormatter
Number formatter instance
dateFormatter
Date/time formatter instance
durationFormatter
Duration formatter instance
tabindex
Global tab index for using for the whole chart
interfaceColors
Special color set to be used for various controls
verticalLayout
An instance of vertical layout object that can be used to set
layout setting of a ContainerhorizontalLayout
An instance of horizontal layout object that can be used to set
layout setting of a ContainergridLayout
An instance of grid layout object that can be used to set
layout setting of a ContainerautoResize
Indicates whether chart should resize automatically when parent container width/height changes
autoResize = false), you can resize the chart manually by calling resize() method.
nonce
Used for dynamically-created CSS and JavaScript with strict source policies
entitiesById
Entities that have their
id setting setevents
Root’s event dispatcher
Methods
setThemes()
Sets themes to be used for the chart.A list of themes
resize()
Manually resizes the chart. Use this when automatic resizing is disabled (root.autoResize = false).
dispose()
Disposes root and all the content in it.isDisposed()
Returnstrue if root element is disposed.
Whether the root is disposed
width()
Returns width of the target container in pixels.Width in pixels
height()
Returns height of the target container in pixels.Height in pixels
moveDOM()
Moves the Root to a different HTML element.ID of the new target HTML element or the element itself
readerAlert()
Triggers screen reader to read out a message.Alert text
documentPointToRoot()
Converts document coordinates to coordinates within root element.Document point with x and y coordinates
Root point with x and y coordinates
rootPointToDocument()
Converts root coordinates to document coordinates.Root point with x and y coordinates
Document point with x and y coordinates
eachFrame()
Registers a callback function to be called on each frame.Function to call on each frame
Disposer to remove the callback
focused()
Returnstrue if target sprite is currently focused.
Target sprite
Whether the target is focused
Settings
IRootSettings
Indicates whether chart should use “safe” resolution on some memory-limiting platforms such as Safari
Allows defining margins around chart area for tooltips to go outside the chart itself
Set to
false to disable all accessibility features. NOTE: once disabled, accessibility cannot be re-enabled on a live Root object.If set to
true, the parent inner <div> element will become a focusable elementDistance between focused element and its highlight square in pixels
If set to some string, it will be used as inner
<div> ARIA-LABEL. Should be used in conjunction with focusable.Allows setting a “role” for the inner
<div>Allows for specifying a custom width/height for the chart. This function will be called automatically when the chart is resized.
Events
IRootEvents
Invoked when a frame starts rendering
Invoked when a frame ends rendering