recharts
Version:
React charts
31 lines (30 loc) • 1.29 kB
TypeScript
import * as React from 'react';
import { ActiveDotType, DataKey } from '../util/types';
import { ZIndexable } from '../zIndex/ZIndexLayer';
import { ColorStyles2D } from '../theme/themeFill';
export interface PointType {
readonly x: number | null;
readonly y: number | null;
readonly value?: any;
readonly payload?: any;
}
interface ActivePointsProps extends ZIndexable {
points: ReadonlyArray<PointType>;
/**
* Different graphical elements have different opinion on what is their main color.
* Sometimes stroke, sometimes fill, sometimes combination.
* `undefined` means that the color is not set, and the point will be transparent.
*/
mainColor: string | undefined;
itemDataKey: DataKey<any> | undefined;
activeDot: ActiveDotType;
themedActiveStyles?: ColorStyles2D;
clipPath?: string;
}
/**
* Renders the first series point matching the active tooltip payload.
* Skips the point search when active dots are disabled or the active payload is empty.
* @returns The active dot in its z-index layer, or null when there is no point to render.
*/
export declare function ActivePoints({ points, mainColor, activeDot, themedActiveStyles, itemDataKey, clipPath, zIndex, }: ActivePointsProps): React.JSX.Element | null;
export {};