import type { AgWidgetFieldReference } from '../agFieldDefinition'; import type { AgChartDataMapping, AgChartStyle, AgChartTheme } from './shared/agChartShared'; import type { AgMarkerShape } from './shared/agChartShared'; import type { AgWidgetData, AgWidgetDataFormat } from './shared/agWidget'; /** * Scatter series configuration. */ export interface AgScatterChartSeriesConfig { /** * Marker shape for data points. */ shape?: AgMarkerShape; /** * Marker size in pixels. */ size?: number; } export interface AgScatterChartOverrides { /** * Series configuration. */ series?: AgScatterChartSeriesConfig; } /** * Theme configuration for scatter chart. */ export interface AgScatterChartTheme extends AgChartTheme { /** * Scatter-specific settings. */ scatter?: AgScatterChartOverrides; } /** * Style configuration for scatter chart. */ export type AgScatterChartStyle = AgChartStyle; /** * Format configuration for scatter chart. */ export type AgScatterChartFormat = AgWidgetDataFormat; /** * Data mapping for aggregated scatter chart. * Data points are aggregated by group before plotting. */ export interface AgScatterChartDataMapping extends AgChartDataMapping { /** * Field to group data by. */ groupByKey: AgWidgetFieldReference[]; } /** * Aggregated Scatter Chart widget configuration. * Displays aggregated data points grouped by a key. * * @example * const chart: AgScatterChart = { * format: { * title: { text: 'Sales vs Profit by Region', enabled: true } * }, * dataMapping: { * groupByKey: [{ id: 'region' }], * categoryKey: [{ id: 'sales', aggregation: 'sum' }], * valueKey: [{ id: 'profit', aggregation: 'sum' }] * } * }; */ export interface AgScatterChart extends AgWidgetData { /** * Widget type identifier. */ type: 'scatter-chart'; }