UNPKG

reaviz

Version:

Data Visualization using React

38 lines (37 loc) 1.31 kB
import { default as React, FC, ReactElement } from 'react'; import { LinearAxisTickLine, LinearAxisTickLineProps } from './LinearAxisTickLine'; export interface LinearAxisTickLabelProps { text: string; fullText: string; /** * The raw data value for this tick (e.g., Date object, number, string). */ data: any; angle: number; orientation: 'horizontal' | 'vertical'; half: 'start' | 'end' | 'center'; line: ReactElement<LinearAxisTickLineProps, typeof LinearAxisTickLine>; format?: (v: any) => any; /** * Format tooltip title on hover label. */ formatTooltip?: (value: any) => any | string; fill: string; fontSize: number; fontFamily: string; rotation: boolean | number; padding: number | { fromAxis: number; alongAxis: number; }; textAnchor?: 'start' | 'end' | 'middle'; position: 'start' | 'end' | 'center'; align: 'start' | 'end' | 'center' | 'inside' | 'outside'; className?: string; /** * Click handler for the label. */ onClick?: (event: React.MouseEvent<SVGGElement>, data: any) => void; } export declare const LinearAxisTickLabel: FC<Partial<LinearAxisTickLabelProps>>; export declare const LINEAR_AXIS_TICK_LABEL_DEFAULT_PROPS: Partial<LinearAxisTickLabelProps>;