reaviz
Version:
Data Visualization using React
49 lines (47 loc) • 1.33 kB
TypeScript
import { default as React, FC } from 'react';
import { ChartShallowDataShape } from '../common/data';
import { ChartProps } from '../common/containers';
export interface WordCloudProps extends ChartProps {
/**
* Data to render in the word cloud.
* The 'key' represents the word and 'data' represents its frequency/weight.
*/
data: ChartShallowDataShape[];
/**
* Font size range [min, max].
*/
fontSizeRange?: [number, number];
/**
* Font family to use.
*/
fontFamily?: string;
/**
* Padding between words.
*/
padding?: number;
/**
* Rotation angles for words.
*/
rotationAngles?: [number, number];
/**
* Number of possible rotations.
*/
rotations?: number;
/**
* Custom color scheme for words.
*/
colorScheme?: string[];
/**
* Event triggered when a word is clicked.
*/
onLabelClick?: (event: React.MouseEvent, data: ChartShallowDataShape) => void;
/**
* Mouse enter handler.
*/
onLabelMouseEnter?: (event: React.PointerEvent, data: ChartShallowDataShape) => void;
/**
* Mouse leave handler.
*/
onLabelMouseLeave?: (event: React.PointerEvent, data: ChartShallowDataShape) => void;
}
export declare const WordCloud: FC<Partial<WordCloudProps>>;