import { ChartModel } from 'ag-grid-enterprise';
import { AdaptableObject } from '../types';
import { BaseState } from './BaseState';
export declare const isExternalChartDefinition: (chartDefinition: ChartDefinition | ExternalChartDefinition) => chartDefinition is ExternalChartDefinition;
export declare const isAgChartDefinition: (chartDefinition: ChartDefinition | ExternalChartDefinition) => chartDefinition is ChartDefinition;
/**
 * Wraps external chart definitions
 * Can be used to store charts in Adaptable State
 */
export interface ExternalChartDefinition<T = unknown> extends AdaptableObject {
    /**
     * Unique name of the external chart (used in UI references; must not clash with AG Grid chart names)
     */
    Name: string;
    /**
     * Chart configuration. It can store any information needed to create the chart.
     */
    Data: T;
    /**
     * Used to specify if the chart is saved in state or transient state.
     * @defaultValue true
     */
    IsPersisted?: boolean;
}
/**
 * Wraps an AG Grid Chart Model
 */
export interface ChartDefinition extends AdaptableObject {
    /**
     * Unique name of the chart (used in UI and layout references, like Layout names)
     */
    Name: string;
    /**
     * AG Grid Chart Model
     */
    Model: ChartModel;
}
/**
 * Persists AG Grid Charts in Adaptable State
 */
export interface ChartingState extends BaseState {
    /**
     * Wrappers around AG Grid Chart Models
     */
    ChartDefinitions?: ChartDefinition[];
    /**
     * Definitions of External Charts
     */
    ExternalChartDefinitions?: ExternalChartDefinition<unknown>[];
}
/**
 * Aggregation function used in the Chart
 */
export type ChartingAggFunc = 'sum' | 'min' | 'max' | 'count' | 'avg' | 'first' | 'last';
