diff --git a/src/Chart.tsx b/src/Chart.tsx index c1582ea..7a492f7 100644 --- a/src/Chart.tsx +++ b/src/Chart.tsx @@ -33,8 +33,12 @@ type Props = { padding?: Padding } +export type ChartHandle = { + setTooltipIndex: (index: number | undefined) => void +} + const Chart: React.FC = React.memo( - React.forwardRef((props, ref) => { + React.forwardRef((props, ref) => { const { style, children, data = [], padding, xDomain, yDomain, viewport, disableGestures, disableTouch } = deepmerge(computeDefaultProps(props), props) const { dimensions, onLayout } = useComponentDimensions() const dataDimensions = calculateDataDimensions(dimensions, padding)