UNPKG

@visactor/vchart

Version:

charts lib based @visactor/VGrammar

98 lines (97 loc) 6.9 kB
import type { IChartConstructor, IChartOption, IChart, IChartSpecTransformerOption, IChartSpecTransformer } from '../chart/interface'; import type { ISeriesConstructor, ISeriesMarkInfo, ISeriesOption, SeriesMarkNameEnum } from '../series/interface'; import type { IComponentConstructor } from '../component/interface'; import type { IMarkOption, MarkConstructor } from '../mark/interface'; import type { IRegion, IRegionConstructor } from '../region/interface'; import type { IBaseModelSpecTransformer, IBaseModelSpecTransformerOption, IModelOption } from '../model/interface'; import type { Transform, Parser } from '@visactor/vdataset'; import type { ILayoutConstructor } from '../layout/interface'; import type { IChartPluginConstructor } from '../plugin/chart/interface'; import type { IComponentPluginConstructor } from '../plugin/components/interface'; import type { IGraphic } from '@visactor/vrender-core'; import type { GrammarTransformOption, IStageEventPlugin, VRenderComponentOptions } from './interface'; import type { MarkAnimationSpec } from '../animation/interface'; import type { IBaseTriggerOptions, ITriggerConstructor } from '../interaction/interface/trigger'; import type { IComposedEventConstructor } from '../index-harmony-simple'; import type { ITooltipProcessorConstructor } from '../component/tooltip/processor/interface'; import type { ITooltip } from '../component'; export declare class Factory { private static _charts; private static _series; private static _components; private static _graphicComponents; private static _marks; private static _regions; private static _animations; private static _implements; private static _chartPlugin; private static _componentPlugin; private static _formatter; static transforms: { [key: string]: Transform; }; static dataParser: { [key: string]: Parser; }; static _layout: { [key: string]: ILayoutConstructor; }; static registerChart(key: string, chart: IChartConstructor): void; static registerSeries(key: string, series: ISeriesConstructor): void; static registerComponent(key: string, cmp: IComponentConstructor, alwaysCheck?: boolean, createOrder?: number): void; static registerGraphicComponent(key: string, creator: (attrs: any, options?: VRenderComponentOptions) => IGraphic): void; static createGraphicComponent(componentType: string, attrs: any, options?: VRenderComponentOptions): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>; static registerMark(key: string, mark: MarkConstructor): void; static registerRegion(key: string, region: IRegionConstructor): void; static registerTransform(key: string, transform: Transform): void; private static _grammarTransforms; static registerGrammarTransform(type: string, transform: GrammarTransformOption): void; static getGrammarTransform(type: string): GrammarTransformOption; static registerLayout(key: string, layout: ILayoutConstructor): void; static registerAnimation(key: string, animation: (params?: any, preset?: any) => MarkAnimationSpec): void; static registerImplement(key: string, implement: (...args: any) => void): void; static registerChartPlugin(key: string, plugin: IChartPluginConstructor): void; static registerComponentPlugin(key: string, plugin: IComponentPluginConstructor): void; static createChart(chartType: string, spec: any, options: IChartOption): IChart | null; static getChart(chartType: string): IChartConstructor; static createChartSpecTransformer(chartType: string, option: IChartSpecTransformerOption): IChartSpecTransformer | null; static createRegion(regionType: string, spec: any, options: IModelOption): IRegion | null; static createRegionSpecTransformer(regionType: string, options: IBaseModelSpecTransformerOption): IBaseModelSpecTransformer | null; static createSeries(seriesType: string, spec: any, options: ISeriesOption): import("../series/interface").ISeries; static createSeriesSpecTransformer(seriesType: string, options: IBaseModelSpecTransformerOption): IBaseModelSpecTransformer | null; static createMark(markType: string, name: string, options: IMarkOption): import("../mark/interface").IMark; static getComponents(): { cmp: IComponentConstructor; alwaysCheck?: boolean; createOrder: number; }[]; static getComponentInKey(name: string): IComponentConstructor; static getLayout(): ILayoutConstructor[]; static getLayoutInKey(name: string): ILayoutConstructor; static getSeries(): ISeriesConstructor[]; static getSeriesInType(type: string): ISeriesConstructor; static getRegionInType(type: string): IRegionConstructor; static getAnimationInKey(key: string): (params?: any, preset?: any) => MarkAnimationSpec; static getImplementInKey(key: string): (...args: any) => void; static getSeriesMarkMap(seriesType: string): Partial<Record<SeriesMarkNameEnum, ISeriesMarkInfo>>; static getSeriesBuiltInTheme(themeKey: string): Record<string, any>; static getComponentBuiltInTheme(themeKey: string): Record<string, any>; static getChartPlugins(): IChartPluginConstructor[]; static getComponentPlugins(): IComponentPluginConstructor[]; static getComponentPluginInType(type: string): IComponentPluginConstructor; static registerFormatter(func: typeof Factory['_formatter']): void; static getFormatter(): (text: string | number | string[] | number[], datum: any, formatter: string | string[]) => any; private static _stageEventPlugins; static registerStageEventPlugin: (type: string, Plugin: IStageEventPlugin<any>) => void; static getStageEventPlugin: (type: string) => IStageEventPlugin<any>; private static _interactionTriggers; static registerInteractionTrigger: (interactionType: string, interaction: ITriggerConstructor) => void; static createInteractionTrigger(interactionType: string, options?: IBaseTriggerOptions): import("../interaction/interface/trigger").ITrigger<IBaseTriggerOptions>; static hasInteractionTrigger(interactionType: string): boolean; private static _composedEventMap; static registerComposedEvent: (eType: string, composedEvent: IComposedEventConstructor) => void; static getComposedEvent(eType: string): IComposedEventConstructor; private static _tooltipProcessors; static registerTooltipProcessor: (type: string, processor: ITooltipProcessorConstructor) => void; static createTooltipProcessor: (type: string, tooltip: ITooltip) => import("../component/tooltip/processor/interface").ITooltipProcessor<import("../component/tooltip/processor/interface").DimensionTooltipInfo> | import("../component/tooltip/processor/interface").ITooltipProcessor<import("../component/tooltip/processor/interface").MarkTooltipInfo<import("../index-harmony-simple").Datum>>; }