UNPKG

@visactor/vchart

Version:

charts lib based @visactor/VGrammar

68 lines (67 loc) 3.28 kB
import type { IPadding } from '@visactor/vutils'; import type { SeriesMarkMap } from '../interface'; import type { IWordCloudSeriesSpec, IWordCloudSeriesTheme, WordCloudConfigType, WordCloudShapeConfigType, WordCloudShapeType } from './interface'; import type { Datum, IMarkSpec, IPoint, ITextMarkSpec } from '../../typings'; import { BaseSeries } from '../base/base-series'; import type { IMark, IRectMark, ITextMark } from '../../mark/interface'; import type { GeometricMaskShape, TextShapeMask } from '@visactor/vlayouts'; export type IBaseWordCloudSeriesSpec = Omit<IWordCloudSeriesSpec, 'type'> & { type: string; }; export declare class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IBaseWordCloudSeriesSpec> extends BaseSeries<T> { static readonly mark: SeriesMarkMap; static readonly builtInTheme: Record<string, IWordCloudSeriesTheme>; protected _nameField: string; protected _valueField?: string; setValueField(field: string): void; protected _colorMode: 'linear' | 'ordinal'; protected _colorList: string[]; protected _rotateAngles?: number[]; protected _fontWeightRange?: [number, number]; protected _textField?: string; protected _maskCanvas?: HTMLCanvasElement; protected _maskMark?: IRectMark; protected _fontSizeRange?: [number, number] | 'auto'; setFontSizeRange(fontSizeRange: [number, number] | 'auto'): void; protected _maskShape?: string | WordCloudShapeType | TextShapeMask | GeometricMaskShape; protected _isWordCloudShape: boolean; protected _wordCloudConfig?: WordCloudConfigType; protected _wordCloudShapeConfig?: WordCloudShapeConfigType; protected _padding?: IPadding; protected _defaultFontFamily: string; protected _keyWordColorCallback: (datum: Datum) => string; protected _fillingColorCallback: (datum: Datum) => string; protected _dataChange: boolean; protected handleMaskCanvasUpdate: (canvas: HTMLCanvasElement, imageUrl?: string) => void; setAttrFromSpec(): void; protected initData(): void; protected _wordMark: ITextMark; initMark(): void; initMarkStyle(): void; initMarkStyleOfWord(wordMark: ITextMark, wordSpec?: IMarkSpec<ITextMarkSpec>, colorHexField?: string, seriesField?: string, isFillingWord?: boolean): void; protected initTooltip(): void; initAnimation(): void; protected getWordOrdinalColorScale(field: string, isFillingWord: boolean): any; protected initColorCallback(field: string, isFillingWord: boolean): any; getWordColor: (datum: Datum) => string; private _calculateFontWeight; compile(): void; protected _getCommonTransformOptions(): any; protected _wordCloudTransformOption(): Object; protected _wordCloudShapeTransformOption(): Object; getStatisticFields(): { key: string; operations: Array<'max' | 'min' | 'values'>; }[]; dataToPosition(data: Datum): IPoint; dataToPositionX(data: any): number; dataToPositionY(data: any): number; dataToPositionZ(data: any): number; valueToPosition(value1: any, value2?: any): IPoint; getGroupFields(): string[]; getStackGroupFields(): string[]; getStackValueField(): string; onLayoutEnd(): void; getActiveMarks(): IMark[]; reInit(): void; }