import type { PluginConfig } from "../charts/chart"; export type ChartType = "bar" | "line" | "scatter" | "area"; export type PluginChartType = ChartType | "candlestick" | "ohlc"; /** * Subset of `PluginConfig` keys that a chart impl actually consumes. * Drives `plugin_config_schema()` filtering — the host only renders * the controls listed here, and `plugin.restore({ plugin_config })` * still hands the full struct to the worker (other keys are inert). */ export type PluginConfigField = keyof PluginConfig; export interface ChartTypeConfig { name: string; tag: string; category: string; selectMode: "select" | "toggle"; initial: { count: number; names: string[]; }; max_cells: number; max_columns: number; default_chart_type?: PluginChartType; /** * Plugin-config keys this chart type renders controls for. Empty * for plugins with no global settings (heatmap / treemap / * sunburst). See {@link PluginConfig} for field semantics. */ applicable_plugin_fields: readonly PluginConfigField[]; /** * Per-chart-type overrides for `DEFAULT_PLUGIN_CONFIG`. Used when a * field's sensible default differs by chart family — currently * `include_zero` (true for Y Bar / Y Area / X Bar, false for line * / scatter / cartesian / financial). Applied at schema generation * and at `restore({})` so the effective default matches the * surfaced UI default. */ plugin_field_defaults?: Partial; } declare const CHARTS: ChartTypeConfig[]; export default CHARTS;