import type { DataItem } from "../../core/render/Component"; import type { PercentSeries, IPercentSeriesDataItem } from "../../charts/percent/PercentSeries"; import type { Legend } from "../../core/render/Legend"; import { Button } from "../../core/render/Button"; import { Entity, IEntitySettings, IEntityPrivate, IEntityEvents } from "../../core/util/Entity"; export interface ISliceGrouperSettings extends IEntitySettings { /** * The series whose small slices are grouped. */ series?: PercentSeries; /** * Legend to keep in step with the grouping: it gets an item for the group * slice, and the items of the grouped slices are hidden. */ legend?: Legend; /** * Slices whose share of the total is at or below this percent are * grouped. * * @default 5 */ threshold?: number; /** * Keeps only this many first slices; the rest are grouped. */ limit?: number; /** * Name (category) of the group slice. * * @default "Other" */ groupName?: string; /** * What a click on the group slice does: * * * `"none"`: nothing. * * `"break"`: replaces the group slice with the small slices. * * `"zoom"`: shows only the small slices, hiding the others. * * @default "none" */ clickBehavior?: "none" | "break" | "zoom"; } export interface ISliceGrouperPrivate extends IEntityPrivate { groupDataItem?: DataItem; normalDataItems?: DataItem[]; smallDataItems?: DataItem[]; currentStep?: number; currentPass?: number; currentCount?: number; } export interface ISliceGrouperEvents extends IEntityEvents { } /** * A plugin that can be used to automatically group small slices on percent * charts into a single slice. * * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/grouping-slices/} for more info */ export declare class SliceGrouper extends Entity { static className: string; static classNames: Array; _settings: ISliceGrouperSettings; _privateSettings: ISliceGrouperPrivate; _events: ISliceGrouperEvents; /** * Button shown while the small slices are shown after a click on the * group slice; it groups them again. Made only when `clickBehavior` is not * `"none"`. */ zoomOutButton?: Button; protected _afterNew(): void; private initZoomButton; private handleData; /** * Groups the small slices again, as a click on `zoomOutButton` does. */ zoomOut(): void; private updateGroupDataItem; private handleClick; _beforeChanged(): void; } //# sourceMappingURL=SliceGrouper.d.ts.map