import type { ChartContextMenuSpec, ChartMenuToken } from '@xh/hoist/cmp/chart/Types'; import { HoistModel, PlainObject, Some } from '@xh/hoist/core'; interface ChartConfig { /** The initial highchartsConfig for this chart. */ highchartsConfig: PlainObject; /** The initial data series to be displayed. */ series?: Some; /** * True (default) to show default ContextMenu. Supported on desktop only. */ contextMenu?: ChartContextMenuSpec; /** @internal */ xhImpl?: boolean; } export interface ChartModelDefaults { contextMenu?: ChartMenuToken[]; } /** * Model for a Highcharts-based {@link Chart} component. Holds the Highcharts configuration * object and data series, providing observable state that drives chart rendering. * * Set `highchartsConfig` for chart-level options (chart type, axes, legend, etc.) and * `series` for the data to display. Both are observable and can be updated at any time * via their setters to trigger a re-render. * * The underlying Highcharts instance is available via the `highchart` property for * read-only access - mutations should go through `setHighchartsConfig` or `setSeries`. * * @see Chart */ export declare class ChartModel extends HoistModel { /** App-level defaults for ChartModel. Instance config takes precedence. */ static defaults: ChartModelDefaults; highchartsConfig: PlainObject; series: any[]; contextMenu: ChartContextMenuSpec; /** * The HighCharts instance currently being displayed. This may be used for reading * information about the chart, but any mutations to the chart should * be done via {@link setHighchartsConfig} or {@link setSeries}. */ highchart: any; /** True if this chart has no series to display */ get empty(): boolean; constructor(config?: ChartConfig); /** * Update the Highcharts instance configuration. * * See also {@link updateHighchartsConfig} for a method that will allow updating individual * properties in this object. * * @param config - Highcharts configuration object. May include any Highcharts options other * than `series`, which should be set via `setSeries()`. */ setHighchartsConfig(config: any): void; /** * Merge new properties settings into the Highcharts configuration (Deep merge) * * @param update - Updates to Highcharts configuration settings. May include any * Highcharts options other than `series`, which should be set via `setSeries()`. */ updateHighchartsConfig(update: any): void; /** @param series - one or more data series to be charted. */ setSeries(series: any | any[]): void; /** Remove all series from this chart. */ clear(): void; private parseContextMenu; } export {};