import { EventEmitter } from '../../stencil-public-runtime'; import type { ChartLegendItem } from '../../utils/chart-types'; export type ChartLegendDirection = 'vertical' | 'horizontal'; export type ChartLegendPercentageDecimals = 1 | 2; /** * Base legend for `ds-chart-*` components. Webapp's Overview widgets each style * legends differently (list w/ values, compact chips, bare swatches, external * stat callouts) — this covers the common "swatch + label + optional value" case. * Consumers who need a different treatment skip this component entirely and * render their own markup against the same `ChartLegendItem[]` data. */ export declare class ChartLegend { locale: string | undefined; /** Legend entries. Set as a JS property (not an HTML attribute). */ items: ChartLegendItem[]; direction: ChartLegendDirection; /** Show each item's share of the total (of items with a `value`) alongside its count. */ showPercentage: boolean; /** Fixed number of decimal places shown for percentages. */ percentageDecimals: ChartLegendPercentageDecimals; /** Let local pointer/focus movement highlight one item and emit `dsItemHover`. */ highlightOnHover: boolean; /** * Externally controlled highlight, matched by `label` — e.g. drive this from a sibling * chart's `dsSliceHover` event to keep chart and legend hover in sync. Only dims the other * rows' opacity (like a chart dimming its other slices) — it never shows the hover-fill, * since that's reserved for a real pointer/keyboard interaction on this row. */ activeLabel: string | null; /** Own pointer/focus hover, kept separate from `activeLabel` so the hover-fill (a "you can * click here" affordance) never shows just because an external row was synced in. */ private hoveredLabel; /** Fires on row hover/focus with the item, or `null` on leave/blur. */ dsItemHover: EventEmitter; /** Fires when a deep-linkable row (`item.href` set) is activated. */ dsItemClick: EventEmitter<{ item: ChartLegendItem; originalEvent: MouseEvent; }>; handleHighlightOnHoverChange(enabled: boolean): void; private handleHover; private handleClick; render(): any; } //# sourceMappingURL=ChartLegend.d.ts.map