import { OptionFactory } from '../echart'; import { PieEChartsOption, PieOptionFactoryInput, PieOptionsInput } from './types'; /** * Builds the **structural** ECharts option for a pie / donut widget. * Mirrors v1's pie look-and-feel: themed legend (`buildLegendConfig`), * themed tooltip via `createTooltipPositioner` / `createTooltipFormatter`, * `qualitative.bold` color palette, slice borders against the paper * background, hover-emphasis disabled, and a centered rich-text label. * * Layered like Bar / Histogram: * - **Theme-aware bits** live here on a series template (slice border, * center-label rich style sizes, emphasis-disabled). * - **Reactive bits** (tooltip value formatter, center-label text, * selection-driven dim) are re-emitted by * {@link createPieOptionFactory} at fusion time so RelativeData's * percent override flows through. */ export declare function pieOptions({ theme, formatter, labelFormatter, }: PieOptionsInput): PieEChartsOption; /** * Returns the pie widget's {@link OptionFactory} — one closure that owns * BOTH phases of option construction: * * - **Structural phase** (`option == null`) — builds the theme-aware * structural option via {@link pieOptions}, optionally merging the * consumer-supplied `optionsOverride` on top. Called once by Provider * to seed `rawOptions` in the store. * - **Merge phase** (`option != null`) — fuses post-pipeline `state.data` * (`PieWidgetData`) into the option via the dataset API. Single-series * → donut (one dataset, `series[i].encode = { itemName: 'name', value: 'value' }`). * Multi-series → horizontal-bar fallback (mirrors v1 pie). Reactive * formatters from `ctx` drive the tooltip + center label at fusion * time so RelativeData's percent formatter flows through without a * structural rebuild. */ export declare function createPieOptionFactory(options: PieOptionFactoryInput): OptionFactory;