import { ChattyHostBuilder } from '@looker/chatty'; import BaseEmbedItem from './base-embed-item'; import { EmbedChartOptions, RenderingSpec } from './types'; declare class ChartEventSender extends BaseEmbedItem { protected name: string; protected ERRORS: { SEND: string; IFRAME: string; }; protected COLOUR: { LIGHT: string; DARK: string; }; protected options: EmbedChartOptions; /** @ignore */ constructor(options: Partial); protected getEmbedUrl(): string; } declare const Chart_base: { new (...args: any[]): { setHighlight(value: import("./types").PlainObject): Promise; getHighlight(): Promise; getData(): Promise; _send(msgName: string, ...payload: unknown[]): Promise<[unknown]>; }; } & { new (...args: any[]): { setPreFilter(value: import("./types").PlainObject): Promise; getPreFilter(): Promise; setFilter(value: import("./types").PlainObject): Promise; getFilter(): Promise; _send(msgName: string, ...payload: unknown[]): Promise<[unknown]>; }; } & { new (...args: any[]): { refresh(): Promise; _send(msgName: string, ...payload: unknown[]): Promise<[unknown]>; }; } & { new (...args: any[]): { _eventHandlers: Record>; _handleEvent(event: import("./types").EmbedChartEvent, payload: import("./types").EventHandlerPayload, handlerIds: string[]): void; addEventListener(event: import("./types").EmbedChartEvent, eventHandler: import("./types").EventHandler, options?: import("./types").EventHandlerOptions | undefined): Promise; removeEventListener(event: import("./types").EmbedChartEvent, eventHandler: import("./types").EventHandler, options?: import("./types").EventHandlerOptions | undefined): Promise; _send(msgName: string, ...payload: unknown[]): Promise<[unknown]>; }; } & typeof ChartEventSender; /** * # Chart * * Allows you to interact and embed charts into your application. * * ```js * const sdk = new EmbedSDK({ ... }); * const chart = sdk.createChart({ ... }); * * // renders a chart * chart.render(document.getElementById('embed-chart')); * * // dynamically set a filter * chart.setFilter({ age: { $gt: 50 } }); * ``` */ declare class Chart extends Chart_base { private renderingSpec; /** * Sends the `ready` event to Charts to render the embedded chart in the component * @param container where the chart will render */ render(container: HTMLElement): Promise; /** * @returns the number of seconds a chart will wait before refreshing * @deprecated This method is deprecated. Please use the 'autoRefresh' option with the 'maxDataAge' option to configure how often the chart refreshes. */ getRefreshInterval(): Promise; /** * Set the number of seconds a chart will wait before refreshing. * * The minimum refresh interval is 10 seconds. To disable, set the refresh interval to 0. * @deprecated This method is deprecated. Please use the 'autoRefresh' option with the 'maxDataAge' option to configure how often the chart refreshes. */ setRefreshInterval(value: number): Promise; protected _configureHost(hostBuilder: ChattyHostBuilder): ChattyHostBuilder; /** * Sets a set of customizations on the rendered chart * @param value customization settings and values * @returns a promise that resolves once the rendering spec is saved and the component rerendered */ setRenderingSpecOverride(value: RenderingSpec): Promise; /** * Get the channel data from the current chart * @returns a promise that resolves to the channel data on the current chart */ getChannels(): Promise>; /** * Get the customizable axes data from the current chart * @returns a promise that resolves to the axis data on the current chart */ getCustomizableAxes(): Promise | Record>; /** * Gets the customizations applied to a chart after initial render * @returns the customized rendering spec or undefined. */ getRenderingSpecOverride(): RenderingSpec | undefined; } export default Chart; export type { Chart };