import { ComponentProps } from 'react' ; import { ChartType } from '../..' ; import { ScaleType } from '../../../scales/constants' ; import { SpecType } from '../../../specs/constants' ; import { buildSFProps , SFProps , useSpecFactory } from '../../../state/spec_factory' ; import { Datum , stripUndefined } from '../../../utils/common' ; import { BaseDatum , BubbleSeriesSpec , DEFAULT_GLOBAL_ID , SeriesType } from '../utils/specs' ; const buildProps = buildSFProps < BubbleSeriesSpec > ( ) ( { chartType : ChartType . XYAxis , specType : SpecType . Series , seriesType : SeriesType . Bubble , } , { groupId : DEFAULT_GLOBAL_ID , xScaleType : ScaleType . Ordinal , yScaleType : ScaleType . Linear , hideInLegend : false , } ) ; public export const BubbleSeries = function < D extends BaseDatum = Datum > ( props ) { const { defaults , overrides } = buildProps ; useSpecFactory < BubbleSeriesSpec < D > > ( { ... defaults , ... stripUndefined ( props ) , ... overrides } ) ; return null ; } ; public export type BubbleSeriesProps = ComponentProps < typeof BubbleSeries > ;