IRootSettings

Type interface

Inheritance

IRootSettings does not extend any other symbol.

IRootSettings is not extended by any other symbol.

Properties

accessible
#

Type undefined | false | true

Default true

Set to false to disable all accessibility features.

NOTE: once disabled, accessibility cannot be re-enabled on a live Root object.

@since 5.3.0

ariaLabel
#

Type undefined | string

If set to some string, it will be used as inner <div> ARIA-LABEL.

Should be used in conjunction with focusable.

@since 5.3.17
Click here for more info

calculateSize
#

Type undefined | ( dimensions: DOMRect) => ISize

A 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.

focusPadding
#

Type undefined | number

Default 2

Distance between focused element and its highlight square in pixels.

@since 5.6.0

focusable
#

Type undefined | false | true

Default false

If set to true, the parent inner <div> element will become a focusable element.

@since 5.3.17
Click here for more info

fontFamily
#

Type undefined | string

Font family for all labels. It overrides the theme's, but not a fontFamily set on a label itself.

@since 5.20.2

fontSize
#

Type number | string

Font size for all labels: a number in pixels, or a CSS size such as "1.2em". It overrides the theme's, but not a fontSize set on a label itself.

@since 5.20.2

fontWeight
#

Type "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900"

Font weight for all labels. It overrides the theme's, but not a fontWeight set on a label itself.

@since 5.20.2

forcedColors
#

Type undefined | false | true

Default true

Makes 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.

@since 5.21.0

renderer
#

Type IRendererClass

The renderer that draws the chart. Defaults to Root.defaultRenderer, which is CanvasRenderer unless 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.

@since 5.21.0

role
#

Type undefined | string

Allows setting a "role" for the inner <div>.

@since 5.3.17
Click here for more info

sanitizeHTML
#

Type undefined | false | true

Default true

Cleans potentially malicious code out of HTML content (html and labelHTML settings, 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.

@since 5.19.0

tooltipContainerBounds
#

Type undefined | { bottom: number,
  left: number,
  right: number,
  top: number }

Extra space in pixels on each side of the chart where tooltips can still be drawn, letting them go outside the chart's container.

@since 5.2.24

useSafeResolution
#

Type undefined | false | true

Default true

Draws the chart at a resolution of 1 on iOS and iPadOS devices instead of the screen's pixel ratio, to stay within their memory limits. Set to false for sharper charts there.