import { ResponsiveBaseTheme, IResponsiveRule } from "./ResponsiveBaseTheme"; import type { Root } from "../core/Root"; import type { IDisposer } from "../core/util/Disposer"; import type { Sprite } from "../core/render/Sprite"; import type { Container } from "../core/render/Container"; /** * A theme that fits charts to small spaces by adapting them, hiding parts * only as the last step. It turns on the settings that fit labels and legends * to the room they have: * * * `autoLabels` on axis renderers: labels spaced to fit, and hidden where * they would be cut off or overlap another axis's labels. * * `keepInView` on axis labels of a chart 400 px or smaller across the * axis: a category or date period partly in view keeps its label in the * part that is. * * `autoLabels` on pie series: the pie moves aside or gets smaller, and its * labels wrap, are shortened or are hidden, smallest slices first. * * `autoLabels` on other series: bullet labels that would overlap or be cut * off are hidden. Drawings on a stock chart are left alone. * * `autoFit` on legends: smaller, then scrolling, with long names shortened. * * `autoFit` on stock toolbars: controls that do not fit in one row fold, * labels that repeat an icon first, then the period buttons. * * `autoHide` on chart scrollbars: a vertical one goes on a chart 400 px wide * or narrower, a horizontal one on a chart 300 px tall or lower, or 400 px * wide or narrower (a stock chart is measured whole, not by panel); pinching * zooms instead. * * `touchGestures: "auto"` on the root, when the theme is set on the root * and `touchGestures` is not set in code: a vertical swipe on a chart * scrolls the page, one that starts sideways or uses two fingers works * the chart. * * Below 400 px, text is drawn at 85% of its size, and axis labels, legend * items and word cloud words get less padding; scrollbars get smaller margins. * Charts keep their padding, except stock charts 400 px wide or narrower: * their panels sit 6 px from the chart's edges and from each other. Funnel, * pyramid and pictorial labels stay unless the chart is tiny, and radar * labels stay outside the circle. * * Labels added in code with their own font size, such as a title, are drawn * smaller on charts under 600 × 450 px instead, down to three quarters of * their size; a label in the middle of a donut is fitted to the hole by the * pie's `autoLabels`. A label whose own `scale` is set is left alone. * * Settings set on an element in code win over the theme, as with any theme: * `autoLabels: false` on a series or renderer turns that part off. * * @see {@link https://docs.amcharts.com/v5/concepts/responsive-max/} for more info * @since 5.22.0 */ export declare class ResponsiveMaxTheme extends ResponsiveBaseTheme { protected _labelsDp?: IDisposer; protected _labelScale: number; protected _labelsAt: number; protected _labelsRound: number; constructor(root: Root, isReal: boolean); dispose(): void; protected _scaleLabels(): void; protected _walkLabels(container: Container, scale: number, middles: Array): void; protected _scaleLabel(label: Sprite, scale: number): void; /** * Adds a responsive rule and returns it. It applies at once if it is * relevant. * * @param rule Responsive rule * @return Responsive rule */ addRule(rule: IResponsiveRule): IResponsiveRule; /** * Removes a responsive rule from the theme, taking back its settings if * it applies. * * @param rule Responsive rule */ removeRule(rule: IResponsiveRule): void; protected _unapplyRule(rule: IResponsiveRule): void; /** * Adds the theme's settings and its rules for small charts. Where two * rules set the same setting, the later one wins while both apply. */ protected setupDefaultRules(): void; } //# sourceMappingURL=ResponsiveMaxTheme.d.ts.map