import type { MinimalValidConfig, RawSerieData, SupportedLocales, YagrConfig, YagrTheme } from '../types'; import Yagr from '..'; interface UpdateOptions { incremental?: boolean; splice?: boolean; } export declare class DynamicUpdatesMixin { /** * @public * @param locale string | Record * @description Set's locale of chart and redraws all locale-dependent elements. */ setLocale(this: Yagr, locale: SupportedLocales | Record): void; /** * @public * @param title YagrTitleConfig * @description Set's title of chart and redraws all title-dependent elements. */ setTitle(this: Yagr, title: YagrConfig['title']): void; /** * @public * @param themeValue YagrTheme * @description Set's theme of chart and redraws all theme-dependent elements. */ setTheme(this: Yagr, themeValue: YagrTheme): void; /** * @public * @param axes axes config * @description Sets new axes config and redraws all axes. */ setAxes(this: Yagr, axes: YagrConfig['axes']): void; /** * @public * @param seriesId string * @param series Partial * @description Sets new series by series id and redraws series. */ setSeries(this: Yagr, seriesId: string, series: Partial): void; /** * @public * @param seriesIdx number * @param series Partial * @description Sets new series by series index and redraws series. */ setSeries(this: Yagr, seriesIdx: number, series: Partial): void; /** * @public * @param series Partial * @description Sets new series dataset (matching to current timeline) and redraws. */ setSeries(this: Yagr, series: Partial[]): void; /** * @public * @param timeline number[] * @param series Partial * @param options UpdateOptions * @description Sets new series dataset with different timeline and redraws. */ setSeries(this: Yagr, timeline: number[], series: Partial[], options: UpdateOptions): void; /** * @public * @param lineId string | null * @param focus boolean * @description Sets focus on line with given id. If id is null, removes focus from all lines. * @returns void */ setFocus(this: Yagr, lineId: string | null, focus: boolean): void; /** * @public * @param lineId string | null * @param show boolean * @description Sets visibility of line with given id. If id is null, sets visibility of all lines. */ setVisible(this: Yagr, lineId: string | null, show: boolean, updateLegend?: boolean): void; /** * @public * @param scales Record> * @description Sets new scales config and redraws. */ setScales(this: Yagr, scales: Record>): void; /** * @public * @experimental * @param newConfig Partial * @descriptino Sets new config and redraws. */ setConfig(this: Yagr, newConfig: Partial, fullUpdate?: boolean): void; } export {}; /** * Annotations: * 1. If we're operating with dots type then uPlot will be reinitialized * cause it's not possible to re-render dot's markers without reinit * */