UNPKG

@visactor/vchart

Version:

charts lib based @visactor/VGrammar

50 lines (49 loc) 2.41 kB
import { type IGraphicAttribute, type IGraphic, type IGroup } from '@visactor/vrender-core'; import type { IRegion } from '../../region/interface'; import type { IComponent, IComponentOption } from '../interface'; import type { IComponentPluginService, IComponentPlugin } from '../../plugin/components/interface'; import type { IBoundsLike } from '@visactor/vutils'; import type { IGroupMark } from '@visactor/vgrammar-core'; import type { IAnimate } from '../../animation/interface'; import type { Datum, ILayoutRect } from '../../typings'; import type { IComponentSpec } from './interface'; import { LayoutModel } from '../../model/layout-model'; import { BaseComponentSpecTransformer } from './base-component-transformer'; import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface'; export declare class BaseComponent<T extends IComponentSpec = IComponentSpec> extends LayoutModel<T> implements IComponent { static transformerConstructor: typeof BaseComponentSpecTransformer; name: string; readonly modelType: string; readonly transformerConstructor: any; pluginService?: IComponentPluginService; static createComponent(specInfo: IModelSpecInfo, options: IComponentOption): IComponent; protected _option: IComponentOption; protected _regions: IRegion[]; getRegions(): IRegion[]; protected _container: IGroup; created(): void; animate?: IAnimate; constructor(spec: T, options: IComponentOption); initLayout(): void; changeRegions(regions: IRegion[]): void; protected _getNeedClearVRenderComponents(): IGraphic[]; onRender(ctx: IModelRenderOption): void; getVRenderComponents(): IGraphic<Partial<IGraphicAttribute>>[]; protected callPlugin(cb: (plugin: IComponentPlugin) => void): void; protected getContainer(): IGroup; _compareSpec(spec: T, prevSpec: T): { change: boolean; reMake: boolean; reRender: boolean; reSize: boolean; reCompile: boolean; }; release(): void; clear(): void; compile(): void; compileMarks(group?: string | IGroupMark): void; reAppendComponents(): void; protected _delegateEvent: (component: IGraphic, event: any, type: string, item?: any, datum?: Datum) => void; getBoundsInRect(rect: ILayoutRect, fullRect: ILayoutRect): IBoundsLike; getDatum(graphic?: IGraphic<Partial<IGraphicAttribute>>): void; }