UNPKG

reaviz

Version:

Data Visualization using React

60 lines (58 loc) 1.39 kB
import { default as React, FC, ReactElement } from 'react'; import { ChartShallowDataShape } from '../common/data'; import { ChartTooltip, ChartTooltipProps } from '../common/Tooltip'; export interface WordCloudLabelProps { /** * Text to display. */ text: string; /** * Font size in pixels. */ fontSize: number; /** * Font family to use. */ fontFamily: string; /** * Fill color for the text. */ fill: string; /** * X position of the text. */ x: number; /** * Y position of the text. */ y: number; /** * Rotation angle in degrees. */ rotate: number; /** * Original data point. */ data: ChartShallowDataShape; /** * Additional className to apply. */ className?: string; /** * Tooltip element. */ tooltip?: ReactElement<ChartTooltipProps, typeof ChartTooltip> | null; /** * Click handler. */ onClick?: (event: React.MouseEvent, data: ChartShallowDataShape) => void; /** * Mouse enter handler. */ onMouseEnter?: (event: React.PointerEvent, data: ChartShallowDataShape) => void; /** * Mouse leave handler. */ onMouseLeave?: (event: React.PointerEvent, data: ChartShallowDataShape) => void; } export declare const WordCloudLabel: FC<Partial<WordCloudLabelProps>>;