/** * The part of a Chart.js config a form can sensibly show: what kind of chart, the category * labels, and the series. Everything else — `options`, plugin config, per-dataset styling — * is left untouched, which is what lets the form and the JSON editor edit the same beat * without one erasing the other. */ export type ChartSeries = { label: string; data: number[]; }; export type ChartForm = { type: string; labels: string[]; datasets: ChartSeries[]; }; /** Chart types the form offers. Anything else stays reachable through the JSON editor. */ export declare const CHART_TYPES: readonly ["bar", "line", "pie", "doughnut", "radar", "polarArea", "scatter", "bubble"]; export declare const readChartForm: (chartData: unknown) => ChartForm; /** * The form's values written back over the existing config. * * Everything the form does not know about is carried through: sibling keys of `type` and * `data`, sibling keys inside `data`, and every property of a dataset other than `label` and * `data`. A dataset the form added has no counterpart to preserve, so it is written as-is. */ export declare const writeChartForm: (chartData: unknown, form: ChartForm) => Record; /** One line per value, which is how a column of numbers reads and how it is typed. */ export declare const parseNumbers: (text: string) => number[];