IRootSettings
Type interface
Sources
IRootSettings is an interface: it describes a shape of data and is not imported on its own.
Properties
accessibleType
undefined|false|trueDefaulttrueSince 5.3.0Set to
falseto disable all accessibility features.NOTE: once disabled, accessibility cannot be re-enabled on a live
Rootobject.ariaLabelType
undefined|stringSince 5.3.17If set to some string, it will be used as inner
<div>ARIA-LABEL.Should be used in conjunction with
focusable.More info: Accessibility: accessibility of root element
calculateSizeType
undefined| (dimensions:DOMRect) =>ISizeA function that returns the width and height in pixels to draw the chart at, given the container's measured box. It runs when the chart is created and on every resize.
focusableType
undefined|false|trueDefaultfalseSince 5.3.17If set to
true, the parent inner<div>element will become a focusable element.More info: Accessibility: accessibility of root element
focusPaddingType
undefined|numberDefault2Since 5.6.0Distance between focused element and its highlight square in pixels.
fontFamilyType
undefined|stringSince 5.20.2Font family for all labels. It overrides the theme's, but not a
fontFamilyset on a label itself.fontSizeType
number|stringSince 5.20.2Font size for all labels: a number in pixels, or a CSS size such as
"1.2em". It overrides the theme's, but not afontSizeset on a label itself.fontWeightType
"normal"|"bold"|"bolder"|"lighter"|"100"|"200"|"300"|"400"|"500"|"600"|"700"|"800"|"900"Since 5.20.2Font weight for all labels. It overrides the theme's, but not a
fontWeightset on a label itself.forcedColorsType
undefined|false|trueDefaulttrueSince 5.21.0Makes the chart's interface colors (labels, grid, axes, buttons) follow the system colors when the page is in a forced colors mode, such as Windows High Contrast, so they stay visible. Series colors are kept.
rendererType
IRendererClassSince 5.21.0The renderer that draws the chart. Defaults to
Root.defaultRenderer, which isCanvasRendererunless changed.To draw with SVG, use
am5.SVGRenderer:const root = am5.Root.new("chartdiv", { renderer: am5.SVGRenderer });var root = am5.Root.new("chartdiv", { renderer: am5.SVGRenderer });Can only be set when the Root is created.
roleType
undefined|stringSince 5.3.17Allows setting a "role" for the inner
<div>.More info: Accessibility: accessibility of root element
sanitizeHTMLType
undefined|false|trueDefaulttrueSince 5.19.0Cleans potentially malicious code out of HTML content (
htmlandlabelHTMLsettings, HTML tooltips, modals, export menu labels) before it goes on the page.Turn it off only if you trust all HTML content: unsanitized HTML from untrusted data can lead to XSS attacks.
tooltipContainerBoundsType
undefined| { bottom:number, left:number, right:number, top:number}Since 5.2.24Extra space in pixels on each side of the chart where tooltips can still be drawn, letting them go outside the chart's container.
useSafeResolutionType
undefined|false|trueDefaulttrueDraws the chart at a resolution of
1on iOS and iPadOS devices instead of the screen's pixel ratio, to stay within their memory limits. Set tofalsefor sharper charts there.