UNPKG

@visactor/vrender-components

Version:

components library for dp visualization

107 lines (106 loc) 3.9 kB
import type { TextAlignType, IGroup, IText, TextBaselineType } from '@visactor/vrender-core'; import { type TagAttributes } from '../tag'; import type { LineAxisAttributes, AxisItem } from './type'; import { AxisBase } from './base'; import { LineAxisMixin } from './mixin/line'; import type { ComponentOptions } from '../interface'; export interface LineAxis extends Pick<LineAxisMixin, 'isInValidValue' | 'getTickCoord' | 'getVerticalVector' | 'getRelativeVector'>, AxisBase<LineAxisAttributes> { } export declare class LineAxis extends AxisBase<LineAxisAttributes> { 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; }; }; labelHoverOnAxis: { visible: boolean; space: number; padding: number; position: number; autoRotate: boolean; textStyle: { fontSize: number; fill: string; fontWeight: string; fillOpacity: number; }; background: { visible: boolean; style: { cornerRadius: number; fill: string; }; }; }; 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; }; }; }; private _breaks; private labelHoverOnAxisGroup; constructor(attributes: LineAxisAttributes, options?: ComponentOptions); protected _renderInner(container: IGroup): void; protected renderLabelHoverOnAxis(): void; protected renderLine(container: IGroup): void; protected getTextAlign(vector: number[]): TextAlignType; protected getTitleAttribute(): TagAttributes; protected getLabelHoverOnAxisAttribute(): TagAttributes; protected getTextBaseline(vector: number[], inside?: boolean): TextBaselineType; protected getLabelAlign(vector: [number, number], inside?: boolean, angle?: number): { textAlign: TextAlignType; textBaseline: TextBaselineType; }; 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; private _getAxisLabelLimitLength; showLabelHoverOnAxis(position: number, text: string, adjustPosition?: boolean): void; hideLabelHoverOnAxis(): void; getActualOffset(offset: number): number; release(): void; }