import { ChartOptions } from '../../types/vega-chart'; import { BaseDrawer } from './drawers/base-drawer'; import { BaseRenderer } from './renderers/base-renderer'; import { BaseInteractor } from './interactors/base-interactor'; /** This is a TypeScript class called `BaseChart` that serves as a base class for creating charts */ export declare abstract class BaseChart { protected options: ChartOptions; protected isLayoutSet: boolean; protected renderer: BaseRenderer; protected drawers: BaseDrawer[]; protected interactor: BaseInteractor; private dimensionController; /** * This is a constructor function that initializes a chart with options and creates a chain of drawers for rendering. * * @param {ChartOptions} options - generic type that represents the configuration options for the chart */ constructor(options: ChartOptions); /** * The function clears the renderer. */ clear(): void; /** * This function updates the chart options, creates a new drawer chain, resets the layout, and renders the chart. * * @param {ChartOptions} options - ChartOptions is a generic type that represents the configuration options for a * chart. It can include properties such as the chart type, data, labels, colors, and other stylingoptions */ updateOptions(options: ChartOptions): void; /** * re render the chart using existing options */ reRender(): void; /** * sets the layout if it hasn't been set yet, and executes all the drawers. unregister the interactor by drawer */ render(): void; /** * sets the layout of a renderer using the options provided. */ protected setLayout(): void; /** * This function initializes layout options for a chart. * * @param {ChartOptions} options - ChartOptions is a generic type that represents the configuration options for a * chart. It includes properties such as data, layout, and style. */ private initLayoutOptions; /** * This function un-registers drawers from the interactor. */ private unregisterByDrawer; /** * create a chain of `BaseDrawer` objects that will be used to draw the chart * * @param {BaseRenderer} renderer svg or canvas renderer * @param {BaseInteractor} interactor svg or canvas interactor * @returns {BaseDrawer[]} drawer array */ abstract createDrawerChain(renderer: BaseRenderer, interactor: BaseInteractor): BaseDrawer[]; }