UNPKG

@antv/f2-wordcloud

Version:

F2 wordcloud extension

36 lines (35 loc) 933 B
import { JSX, Component } from '@antv/f2'; export type CustomShape = (theta: number) => number; export interface WordCloudProps { data: Record<string, any>; /** * @title 字体 */ fontFamily?: string; fontweight?: string | number; /** * @title 颜色主题 */ color?: 'random-dark' | 'random-light' | string; fontSize?: string | number; /** * @title 绘制云的形状 */ shape?: 'circle' | 'cardioid' | 'diamond' | 'triangle-forward' | 'triangle' | 'pentagon' | 'star' | CustomShape; /** * @title shape 的平坦度 */ ellipticity?: number; /** * @title 遮罩的形状 */ maskShape?: JSX.Element; } declare class WordCloud extends Component<WordCloudProps> { isSupported: boolean; constructor(props: any, context: any); didMount(): void; render(): JSX.Element; layoutWord(): void; } export default WordCloud;