@visactor/vgrammar-core
Version:
VGrammar is a visual grammar library
29 lines (28 loc) • 1.95 kB
TypeScript
import type { CircleAxisAttributes, LineAxisAttributes } from '@visactor/vrender-components';
import type { IBaseScale } from '@visactor/vscale';
import type { IGroupMark, IScale, ITheme, IView, MarkFunctionType, MarkRelativeItemSpec, Nil, RecursivePartial, SimpleSignalType } from '../types';
import type { AxisSpec, AxisType, IAxis } from '../types/component';
import { ScaleComponent } from './scale';
import type { IBaseCoordinate } from '@visactor/vgrammar-coordinate';
export declare const generateLineAxisAttributes: (scale: IBaseScale, theme?: ITheme, addition?: RecursivePartial<LineAxisAttributes>, tickCount?: number) => LineAxisAttributes;
export declare const generateCircleAxisAttributes: (scale: IBaseScale, theme?: ITheme, addition?: RecursivePartial<CircleAxisAttributes>, tickCount?: number) => CircleAxisAttributes;
export declare const generateCoordinateAxisAttribute: (scale: IScale, coordinate: IBaseCoordinate, inside: boolean, baseValue: number, layout: MarkRelativeItemSpec, isGrid?: boolean) => any;
export declare class Axis extends ScaleComponent implements IAxis {
static readonly componentType: string;
protected spec: AxisSpec;
private _axisComponentType;
constructor(view: IView, group?: IGroupMark, mode?: '2d' | '3d');
protected parseAddition(spec: AxisSpec): this;
scale(scale?: IScale | string | Nil): this;
axisType(axisType: AxisType | Nil): this;
addGraphicItem(attrs: any, groupKey?: string): any;
tickCount(tickCount: SimpleSignalType<number> | Nil): this;
inside(inside: MarkFunctionType<boolean> | Nil): this;
baseValue(baseValue: MarkFunctionType<number> | Nil): this;
getAxisComponentType(): "lineAxis" | "circleAxis";
protected _updateComponentEncoders(): void;
private _getAxisComponentType;
}
export declare const registerAxis: () => void;
export declare const registerLineAxis: () => void;
export declare const registerCircleAxis: () => void;