@aniruddha1806/bubble-chart
Version:
A customizable, responsive bubble chart component for React with TypeScript support
37 lines (36 loc) • 1.11 kB
TypeScript
import type React from "react";
export type BubbleDataPoint = {
x: number;
y: number;
size: number;
label?: string;
color?: string;
};
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;
};
export declare const BubbleChart: React.FC<BubbleChartProps>;
export default BubbleChart;