import type { AgChartDataMapping, AgChartStyle, AgChartTheme, AgSectorLabel } from './shared/agChartShared'; import type { AgWidgetData, AgWidgetDataFormat } from './shared/agWidget'; /** * Pie series configuration. */ export interface AgPieChartSeriesTheme { /** * Sector label configuration. */ sectorLabel?: AgSectorLabel; } export interface AgPieChartOverrides { /** * Styling for the pie series. */ series?: AgPieChartSeriesTheme; } /** * Theme configuration for pie chart. */ export interface AgPieChartTheme extends AgChartTheme { /** * Pie-specific settings. */ pie?: AgPieChartOverrides; } /** * Style configuration for pie chart. */ export type AgPieChartStyle = AgChartStyle; /** * Format configuration for pie chart widget. */ export type AgPieChartFormat = AgWidgetDataFormat; /** * Pie Chart widget configuration. * Displays data as proportional slices of a circle. * Best for showing parts of a whole when there are few categories. * * @example * const chart: AgPieChart = { * format: { * title: { text: 'Market Share', enabled: true }, * style: { * theme: { common: { legend: { enabled: true, position: 'right' } } } * } * }, * dataMapping: { * categoryKey: [{ id: 'company' }], * valueKey: [{ id: 'revenue', aggregation: 'sum' }] * } * }; */ export interface AgPieChart extends AgWidgetData { /** * Widget type identifier. */ type: 'pie-chart'; }