import { CSSProperties, PropsWithChildren } from 'react'; import { Margin } from '../../common/types/margin'; import * as d3 from "d3"; export type BubbleChartData = { xValue: number; yValue: number; sizeValue: number; color?: string; stroke?: string; style?: string; name?: string; }; export type RenderTooltipProps = { data: BubbleChartData; circle: SVGCircleElement; tooltip: d3.Selection; }; export type BubbleChartCustomizeProps = { svg: d3.Selection; yScale: d3.ScaleLinear; xScale: d3.ScaleLinear; sizeScale: d3.ScaleLinear; bubbles: d3.Selection; }; export interface BubbleChartProps extends PropsWithChildren { className?: string; style?: CSSProperties; width?: number; height?: number; margin?: Margin; data: BubbleChartData[]; xAxisPadding?: number; yAxisPadding?: number; customYScale?: (yScale: (value: number) => number) => void; customYAxisLeft?: (yAxisLeft: d3.Axis) => void; customYAxis?: (yAxis: d3.Selection) => void; customXScale?: (xScale: d3.ScaleLinear) => void; customXAxis?: (xAxis: d3.Selection) => void; minSize?: number; maxSize?: number; minYValue?: number; maxYValue?: number; drawGridY?: boolean; drawGridX?: boolean; scaleLog?: boolean; xScaleItemWidth?: number; bubbleStyle?: string; customize?: (props: BubbleChartCustomizeProps) => void; yScaleLabel?: string; yScaleLabelPadding?: number; enableTooltip?: boolean; tooltipRoot?: Element; tooltipClassName?: string; renderTooltip?: (props: RenderTooltipProps) => void; }