/** * Canonical cross-widget series metadata. * * Every widget that can carry multiple series (Bar, Pie, Histogram, * Scatterplot, Timeseries, Category, Formula, Spread) accepts a * `series: readonly WidgetSeries[]` prop. The `name` drives legends, * tooltips, and category-row avatars; the optional `color` overrides * the default palette assignment. * * For backward compatibility, the widget-specific names * (`FormulaSeries`, `CategorySeriesConfig`) are kept as type aliases of * `WidgetSeries` — see `formula/types.ts` and `category/types.ts`. * * Colours accept MUI theme paths (e.g. `'primary.main'`) as well as raw * CSS strings (`'#ff0000'`, `'rgb(…)'`). The echart-based widgets * resolve them through `resolveThemeColor` (see * `widgets-v2/utils/resolve-theme-color.ts`); Category and Formula/Spread * resolve them implicitly via MUI's `sx` prop. */ export interface WidgetSeries { /** Display name — drives legend, tooltip, and avatar glyphs. */ name: string /** Optional colour override. MUI theme path or raw CSS string. */ color?: string }