ag-charts-types
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
14 lines (13 loc) • 618 B
TypeScript
import type { ContextDefault, DatumDefault } from './types';
export interface AgDataSourceOptions<TDatum = DatumDefault, TContext = ContextDefault> {
/** Asynchronous callback to load data into the chart. */
getData: (params: AgDataSourceCallbackParams<TContext>) => Promise<TDatum[]>;
}
export interface AgDataSourceCallbackParams<TContext = ContextDefault> {
/** The start of the visible window, if a time axis is available. */
windowStart?: Date;
/** The end of the visible window, if a time axis is available. */
windowEnd?: Date;
/** Chart context object. */
context?: TContext;
}