` element will become a focusable
* element.
*
* @since 5.3.17
* @default false
* @see {@link https://docs.amcharts.com/v5/concepts/accessibility/#accessibility-of-root-element} for more info
*/
focusable?: boolean;
/**
* Distance between focused element and its highlight square in pixels.
*
* @since 5.6.0
* @default 2
*/
focusPadding?: number;
/**
* If set to some string, it will be used as inner `
` ARIA-LABEL.
*
* Should be used in conjunction with `focusable`.
*
* @since 5.3.17
* @see {@link https://docs.amcharts.com/v5/concepts/accessibility/#accessibility-of-root-element} for more info
*/
ariaLabel?: string;
/**
* Allows setting a "role" for the inner `
`.
*
* @since 5.3.17
* @see {@link https://docs.amcharts.com/v5/concepts/accessibility/#accessibility-of-root-element} for more info
*/
role?: string;
/**
* 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.
*/
calculateSize?: (dimensions: DOMRect) => ISize;
/**
* Cleans potentially malicious code out of HTML content (`html` and
* `labelHTML` settings, HTML tooltips, modals, export menu labels, stock
* toolbar 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.
*
* @default true
* @since 5.19.0
*/
sanitizeHTML?: boolean;
/**
* The corner of the chart that shows the amCharts logo, when there is no
* licence: `"bl"` (bottom left), `"br"` (bottom right), `"tl"` (top left)
* or `"tr"` (top right).
*
* @default "bl"
* @since 5.24.0
*/
logoPosition?: "bl" | "br" | "tl" | "tr";
/**
* Font family for all labels. It overrides the theme's, but not a
* `fontFamily` set on a label itself.
*
* @since 5.20.2
*/
fontFamily?: 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
*/
fontSize?: number | string;
/**
* Font weight for all labels. It overrides the theme's, but not a
* `fontWeight` set on a label itself.
*
* @since 5.20.2
*/
fontWeight?: "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
/**
* The renderer that draws the chart. Defaults to `Root.defaultRenderer`,
* which is `CanvasRenderer` unless changed.
*
* To draw with SVG, use `am5.SVGRenderer`:
*
* ```TypeScript
* const root = am5.Root.new("chartdiv", {
* renderer: am5.SVGRenderer
* });
* ```
* ```JavaScript
* var root = am5.Root.new("chartdiv", {
* renderer: am5.SVGRenderer
* });
* ```
*
* Can only be set when the Root is created.
*
* @since 5.21.0
*/
renderer?: IRendererClass;
/**
* 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.
*
* @default true
* @since 5.21.0
*/
forcedColors?: boolean;
/**
* The chart's text and legend direction. Set to `"rtl"` for a
* right-to-left language: text with no `direction` of its own is drawn
* right to left, and legends lay out from the right, each marker on the
* right of its name. `"ltr"` keeps everything left to right, e.g. an
* English chart on a `dir="rtl"` page.
*
* Not set, text follows the CSS direction of the chart's element and
* legends stay left to right.
*
* Unlike a container's `direction`, which lays out its children only, this
* applies to text and legends across the chart.
*
* ```TypeScript
* const root = am5.Root.new("chartdiv", {
* direction: "rtl"
* });
* ```
* ```JavaScript
* var root = am5.Root.new("chartdiv", {
* direction: "rtl"
* });
* ```
*
* Set it when the Root is created (or in a JSON config's `root` section);
* it has no setter of its own.
*
* @see {@link https://docs.amcharts.com/v5/concepts/locales/right-to-left-support/} for more info
* @since 5.22.0
*/
direction?: "ltr" | "rtl";
}
/**
* A chart of a product that has a licence on the page: its root shows no
* logo.
*
* @ignore
*/
export declare function _brandingLicensed(root: Root): void;
/**
* The root of a chart: it ties the chart to an HTML element and holds its
* global settings, formatters, locale and themes.
*
* @see {@link https://docs.amcharts.com/v5/getting-started/#root-element} for more info
*/
export declare class Root implements IDisposer {
/**
* The HTML element the chart is in.
*/
dom: HTMLElement;
_inner: HTMLElement;
protected _settings: IRootSettings;
/**
* Settings the Root filled in for itself, so that serializing can leave them
* out - a `Root` is not an `Entity`, so it has no `_computedProperties`.
*
* @ignore
*/
_computedSettings: {
[K in keyof IRootSettings]?: boolean;
};
protected _isDirty: boolean;
protected _isDirtyParents: boolean;
protected _isDirtyAnimation: boolean;
protected _dirty: {
[id: number]: Entity;
};
protected _dirtyParents: {
[id: number]: IParent;
};
protected _dirtyBounds: {
[id: number]: IBounds;
};
protected _dirtyPositions: {
[id: number]: Sprite;
};
protected _ticker: ((currentTime: number) => void) | null;
protected _tickers: Array<(currentTime: number) => void>;
protected _updateTick: boolean;
skipRenderFrame: boolean;
/**
* Root's event dispatcher.
*
* @see {@link https://docs.amcharts.com/v5/concepts/events/} for more info
*/
events: EventDispatcher>;
/**
* Time in milliseconds of the frame being rendered, or `null` while no
* frames run.
*
* @ignore
*/
animationTime: number | null;
private _animations;
_renderer: IRenderer;
_rootContainer: Container;
/**
* The main container: charts and other elements go into its `children`.
*/
container: Container;
/**
* The [[Container]] tooltips are drawn in, above the chart.
*/
tooltipContainer: Container;
protected _tooltipContainerSettings: {
top: number;
left: number;
right: number;
bottom: number;
};
_tooltip: Tooltip;
/**
* @ignore
*/
language: Language;
/**
* Locale for the chart's texts and formatting. English by default.
*
* @see {@link https://docs.amcharts.com/v5/concepts/locales/}
*/
locale: ILocale;
/**
* Treats dates as UTC instead of the user's local time, when formatting
* and parsing them and when placing date axis grid. It takes precedence
* over `timezone`.
*
* @see {@link https://docs.amcharts.com/v5/concepts/formatters/formatting-dates/#utc-and-time-zones} for more info
*/
utc: boolean;
/**
* Time zone to show dates in, instead of the user's local one. Set it to a
* [[Timezone]] with an IANA name, e.g.
* `am5.Timezone.new("America/Vancouver")`. For UTC, `utc` is faster.
*
* Every date is converted, which can slow down charts with large data sets.
*
* @see {@link https://docs.amcharts.com/v5/getting-started/root-element/#time-zone} for more info
* @since 5.1.0
*/
timezone?: Timezone;
protected _pageDirection?: "ltr" | "rtl";
/**
* Direction of text with no `direction` of its own: the `direction`
* setting, else the chart element's, as the browser would draw it.
*
* @ignore
*/
_direction(): "ltr" | "rtl";
/**
* Maximum frames per second. When not set, the chart renders on every
* animation frame of the browser.
*
* Each frame waits `1000 / fps` milliseconds after the previous one is
* drawn, then for the screen's next refresh, so the rate achieved is lower:
* `fps: 30` gives about 20 on a 60 Hz screen.
*
* @see {@link https://docs.amcharts.com/v5/getting-started/root-element/#performance} for more info
*/
fps: number | undefined;
/**
* Number formatter.
*
* @see {@link https://docs.amcharts.com/v5/concepts/formatters/formatting-numbers/} for more info
*/
numberFormatter: NumberFormatter;
/**
* Date/time formatter.
*
* @see {@link https://docs.amcharts.com/v5/concepts/formatters/formatting-dates/} for more info
*/
dateFormatter: DateFormatter;
/**
* Duration formatter.
*
* @see {@link https://docs.amcharts.com/v5/concepts/formatters/formatting-dates/} for more info
*/
durationFormatter: DurationFormatter;
/**
* Tab index for the whole chart.
*
* @see {@link https://docs.amcharts.com/v5/concepts/accessibility/} for more info
*/
tabindex: number;
protected _tabindexes: Sprite[];
protected _a11yD: boolean;
protected _focusElementDirty: boolean;
protected _focusElementContainer: HTMLDivElement | undefined;
protected _focusedSprite: Sprite | undefined;
protected _isShift: boolean | undefined;
protected _keyboardDragPoint: IPoint | undefined;
/**
* The step of the last arrow key move (x and y: -6, 0 or 6), for elements
* that move a whole step whichever way the key points
*
* @ignore
*/
_keyboardDragStep: IPoint;
protected _groupKey: string | undefined;
protected _tooltipElementContainer: HTMLDivElement | undefined;
protected _readerAlertElement: HTMLDivElement | undefined;
protected _groupStops: {
[group: string]: Sprite;
};
protected _groupNoStop: {
[group: string]: boolean;
};
protected _groupStopKept: {
[group: string]: boolean;
};
protected _dirtyGroups: {
[group: string]: string | number;
};
protected _tabindexesDirty: boolean;
protected _dirtyA11y: {
[uid: number]: {
target: Sprite;
full: boolean;
};
};
protected _focusElementSprites: WeakMap;
/**
* @ignore
*/
_logo?: Container;
_tooltipDiv: HTMLDivElement | undefined;
/**
* Nonce for the `