reaviz
Version:
Data Visualization using React
89 lines (88 loc) • 2.16 kB
TypeScript
import { default as React, ReactElement } from 'react';
import { TooltipAreaEvent } from './TooltipAreaEvent';
import { ChartInternalDataShape } from '../data';
import { Placement } from 'reablocks';
import { ChartTooltip, ChartTooltipProps } from './ChartTooltip';
export interface TooltipAreaProps {
/**
* Popperjs placement.
*/
placement: Placement;
/**
* Chart height. Set internally.
*/
height: number;
/**
* Chart width. Set internally.
*/
width: number;
/**
* Chart D3 XScale. Set internally.
*/
xScale: any;
/**
* Chart D3 YScale. Set internally.
*/
yScale: any;
/**
* Whether the tooltip is disabled or not.
*/
disabled: boolean;
/**
* Color setter.
*/
color: any;
/**
* Chart internal data type.
*/
data: ChartInternalDataShape[];
/**
* Child elements to be contained by.
*/
children?: any;
/**
* Whether the area is radial or not.
*/
isRadial?: boolean;
/**
* Whether the area is continous or not (e.g. line and area charts are continous, bar charts are not).
*/
isContinous?: boolean;
/**
* Inner-radius to set the positioning by. Set internally.
*/
innerRadius?: number;
/**
* Outer-radius to set the positioning by. Set internally.
*/
outerRadius?: number;
/**
* Tooltip element.
*/
tooltip: ReactElement<ChartTooltipProps, typeof ChartTooltip>;
/**
* Whether to inverse the data or not.
*/
inverse: boolean;
/**
* When pointer entered mouse area.
*/
onValueEnter: (event: TooltipAreaEvent) => void;
/**
* When pointer left mouse area.
*/
onValueLeave: () => void;
/**
* Whether the layout is horizontal or not.
*/
isHorizontal: boolean;
/**
* Start angle for the first value.
*/
startAngle?: number;
/**
* End angle for the last value.
*/
endAngle?: number;
}
export declare const TooltipArea: React.ForwardRefExoticComponent<Partial<TooltipAreaProps> & React.RefAttributes<any>>;