@aniruddha1806/bubble-chart
Version:
A customizable, responsive bubble chart component for React with TypeScript support
36 lines (35 loc) • 1.05 kB
TypeScript
/// <reference types="react" />
export type BubbleDataPoint = {
x: number;
y: number;
size: number;
label?: string;
color?: string;
[key: string]: any;
};
export type BubbleChartProps = {
data: BubbleDataPoint[];
width?: number | string;
height?: number | string;
colors?: string[];
backgroundColor?: string;
className?: string;
bubbleClassName?: string;
tooltipClassName?: string;
xAxisLabel?: string;
yAxisLabel?: string;
minRadius?: number;
maxRadius?: number;
showTooltip?: boolean;
formatValue?: (value: number) => string;
formatXAxisValue?: (value: number) => string;
formatYAxisValue?: (value: number) => string;
onBubbleClick?: (dataPoint: BubbleDataPoint) => void;
xAxisTicks?: number;
yAxisTicks?: number;
bubbleSizeMultiplier?: number;
absoluteBubbleSize?: boolean;
tooltipContent?: (bubble: BubbleDataPoint) => React.ReactNode;
animated?: boolean;
animationDuration?: number;
};