UNPKG

@visactor/vrender-components

Version:

components library for dp visualization

78 lines (77 loc) 3.08 kB
import type { IGroup, IText, ITextGraphicAttribute, TextAlignType, TextBaselineType } from '@visactor/vrender-core'; import type { Point } from '@visactor/vutils'; import type { CircleAxisAttributes, TickLineItem, AxisItem } from './type'; import { AxisBase } from './base'; import { CircleAxisMixin } from './mixin/circle'; import type { ComponentOptions } from '../interface'; export interface CircleAxis extends Pick<CircleAxisMixin, 'isInValidValue' | 'getTickCoord' | 'getVerticalVector' | 'getRelativeVector'>, AxisBase<CircleAxisAttributes> { } export declare class CircleAxis extends AxisBase<CircleAxisAttributes> { static defaultAttributes: { title: { space: number; padding: number; textStyle: { fontSize: number; fill: string; fontWeight: string; fillOpacity: number; }; }; label: { visible: boolean; inside: boolean; space: number; padding: number; style: { fontSize: number; fill: string; fontWeight: string; fillOpacity: number; }; }; tick: { visible: boolean; inside: boolean; alignWithLabel: boolean; length: number; style: { lineWidth: number; stroke: string; strokeOpacity: number; }; }; subTick: { visible: boolean; inside: boolean; count: number; length: number; style: { lineWidth: number; stroke: string; strokeOpacity: number; }; }; line: { visible: boolean; style: { lineWidth: number; stroke: string; strokeOpacity: number; }; }; }; constructor(attributes: CircleAxisAttributes, options?: ComponentOptions); protected renderLine(container: IGroup): void; protected getTitleAttribute(): any; protected getSubTickLineItems(): TickLineItem[]; protected beforeLabelsOverlap(labelShapes: IText[], labelData: AxisItem[], labelContainer: IGroup, layer: number, layerCount: number): void; protected handleLabelsOverlap(labelShapes: IText[], labelData: AxisItem[], labelContainer: IGroup, layer: number, layerCount: number): void; protected afterLabelsOverlap(labelShapes: IText[], labelData: AxisItem[], labelContainer: IGroup, layer: number, layerCount: number): void; protected getTextBaseline(vector: [number, number]): "top" | "bottom" | "middle"; protected getLabelAlign(vector: [number, number], inside?: boolean, angle?: number): { textAlign: TextAlignType; textBaseline: TextBaselineType; }; protected getLabelPosition(point: Point, vector: [number, number], text: string | number, style: Partial<ITextGraphicAttribute>): Point; }