import type { AgWidgetFieldReference } from '../agFieldDefinition'; import type { AgChartDataMapping, AgChartStyle, AgChartTheme, AgMarkerShape } from './shared/agChartShared'; import type { AgWidgetData, AgWidgetDataFormat } from './shared/agWidget'; /** * Bubble series configuration. */ export interface AgBubbleChartSeriesConfig { /** * Marker shape for bubbles. */ shape?: AgMarkerShape; /** * Minimum bubble size in pixels. */ size?: number; /** * Maximum bubble size in pixels. */ maxSize?: number; } export interface AgBubbleChartOverrides { /** * Series configuration. */ series?: AgBubbleChartSeriesConfig; } /** * Theme configuration for bubble chart. */ export interface AgBubbleChartTheme extends AgChartTheme { /** * Bubble-specific settings. */ bubble?: AgBubbleChartOverrides; } /** * Style configuration for bubble chart. */ export type AgBubbleChartStyle = AgChartStyle; /** * Format configuration for bubble chart. */ export type AgBubbleChartFormat = AgWidgetDataFormat; /** * Data mapping for unaggregated bubble chart. */ export interface AgBubbleChartDataMapping extends AgChartDataMapping { /** * Field to group data by. */ groupByKey: AgWidgetFieldReference[]; /** * Field for bubble size. */ sizeKey: AgWidgetFieldReference[]; } /** * Aggregated Bubble Chart widget configuration. * Displays aggregated data as bubbles grouped by a key. * * @example * const chart: AgBubbleChart = { * format: { * title: { text: 'Regional Performance', enabled: true } * }, * dataMapping: { * groupByKey: [{ id: 'region' }], * categoryKey: [{ id: 'revenue', aggregation: 'sum' }], * valueKey: [{ id: 'profit', aggregation: 'sum' }], * sizeKey: [{ id: 'customers', aggregation: 'count' }] * } * }; */ export interface AgBubbleChart extends AgWidgetData { /** * Widget type identifier. */ type: 'bubble-chart'; }