import { Chart, ChartProps } from '@/components/charts/Chart'; import { useState } from 'react'; import { StatusLight } from 'react-basics'; import { formatLongNumber } from '@/lib/format'; export interface BubbleChartProps extends ChartProps { type?: 'bubble'; } export function BubbleChart(props: BubbleChartProps) { const [tooltip, setTooltip] = useState(null); const { type = 'bubble' } = props; const handleTooltip = ({ tooltip }) => { const { labelColors, dataPoints } = tooltip; setTooltip( tooltip.opacity ? ( {formatLongNumber(dataPoints?.[0]?.raw)} {dataPoints?.[0]?.label} ) : null, ); }; return ; }