UNPKG

@visactor/vgrammar-core

Version:

VGrammar is a visual grammar library

30 lines (29 loc) 1.81 kB
import type { CircleAxisGridAttributes, LineAxisGridAttributes } from '@visactor/vrender-components'; import type { IBaseScale } from '@visactor/vscale'; import type { IGroupMark, IScale, ITheme, IView, MarkFunctionType, Nil, RecursivePartial, SimpleSignalType } from '../types'; import type { GridShape, GridSpec, AxisType, IAxis, IGrid } from '../types/component'; import { ScaleComponent } from './scale'; export declare const generateLineAxisGridAttributes: (scale: IBaseScale, theme?: ITheme, addition?: RecursivePartial<LineAxisGridAttributes>, tickCount?: number) => LineAxisGridAttributes; export declare const generateCircleAxisGridAttributes: (scale: IBaseScale, theme?: ITheme, addition?: RecursivePartial<CircleAxisGridAttributes>, tickCount?: number) => CircleAxisGridAttributes; export declare class Grid extends ScaleComponent implements IGrid { static readonly componentType: string; protected spec: GridSpec; protected mode?: '2d' | '3d'; private _gridComponentType; private _targetAxis; constructor(view: IView, group?: IGroupMark, mode?: '2d' | '3d'); protected parseAddition(spec: GridSpec): this; scale(scale?: IScale | string | Nil): this; gridType(gridType: AxisType | Nil): this; gridShape(gridShape: GridShape | Nil): this; target(axis: IAxis | string | Nil): this; tickCount(tickCount: SimpleSignalType<number> | Nil): this; inside(inside: MarkFunctionType<boolean> | Nil): this; baseValue(baseValue: MarkFunctionType<number> | Nil): this; addGraphicItem(attrs: any, groupKey?: string): any; protected _updateComponentEncoders(): void; private _getGridComponentType; } export declare const registerGrid: () => void; export declare const registerLineGrid: () => void; export declare const registerCircleGrid: () => void;