/**
 * Radar chart type definitions
 * @countermeasure/web-components/charts/radar/types
 */

import type { InteractiveChartConfig } from '../types'

export interface RadarDataset {
  label: string
  values: number[]
  color?: string
  fillOpacity?: number
}

export interface RadarChartConfig extends InteractiveChartConfig {
  /** Axis labels — one per spoke of the radar. */
  labels: string[]
  /** One or more datasets to overlay on the radar grid. */
  datasets: RadarDataset[]
  /**
   * Number of concentric grid rings to draw.
   * @default 5
   */
  levels?: number
  /**
   * Render dots at each polygon vertex.
   * @default false
   */
  showDots?: boolean
  /**
   * Default fill opacity for datasets that don't specify one, 0–1.
   * @default 0.2
   */
  fillOpacity?: number
  /** Maximum value used to normalize spokes (defaults to dataset max). */
  max?: number
}
